@jiaminghi/charts
Advanced tools
Comparing version 0.0.0 to 0.0.1
@@ -0,1 +1,7 @@ | ||
# 0.0.1-alpha (2019-05-30) | ||
### Perfect | ||
- **prototype:** Add prototype function `resize`. | ||
# 0.0.0-alpha (2019-05-29) | ||
@@ -2,0 +8,0 @@ |
@@ -30,2 +30,3 @@ import '../extend/index' | ||
container: dom, | ||
canvas, | ||
render: new CRender(canvas), | ||
@@ -46,21 +47,21 @@ option: null | ||
option = deepClone(option, true) | ||
const optionCloned = deepClone(option, true) | ||
mergeColor(this, option) | ||
mergeColor(this, optionCloned) | ||
grid(this, option) | ||
grid(this, optionCloned) | ||
axis(this, option) | ||
axis(this, optionCloned) | ||
radarAxis(this, option) | ||
radarAxis(this, optionCloned) | ||
title(this, option) | ||
title(this, optionCloned) | ||
bar(this, option) | ||
bar(this, optionCloned) | ||
line(this, option) | ||
line(this, optionCloned) | ||
pie(this, option) | ||
pie(this, optionCloned) | ||
radar(this, option) | ||
radar(this, optionCloned) | ||
@@ -72,2 +73,15 @@ this.option = option | ||
// console.warn(this) | ||
} | ||
Charts.prototype.resize = function () { | ||
const { container, canvas, render, option } = this | ||
const { clientWidth, clientHeight } = container | ||
canvas.setAttribute('width', clientWidth) | ||
canvas.setAttribute('height', clientHeight) | ||
render.area = [clientWidth, clientHeight] | ||
this.setOption(option) | ||
} |
@@ -44,3 +44,3 @@ import { radarConfig } from '../config/index' | ||
if (radarPoint) radarPoint.forEach(item => item.forEach(g => render.delGraph(g))) | ||
if (radarLabel) radarLine.forEach(item => item.forEach(g => render.delGraph(g))) | ||
if (radarLabel) radarLabel.forEach(item => item.forEach(g => render.delGraph(g))) | ||
} | ||
@@ -47,0 +47,0 @@ |
{ | ||
"name": "@jiaminghi/charts", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"author": "JiaMing <743192023@qq.com>", | ||
@@ -5,0 +5,0 @@ "description": "Lightweight charting", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
135790
3829