From f219ba48a6da77b8f9973314d124de2cd932bd3f Mon Sep 17 00:00:00 2001 From: kener Date: Thu, 24 Apr 2014 13:57:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E4=BB=B6=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/axis.js | 6 +++--- src/component/categoryAxis.js | 5 ++++- src/component/dataView.js | 1 - src/component/dataZoom.js | 4 ++-- src/component/grid.js | 1 - src/component/polar.js | 4 ++-- src/component/toolbox.js | 4 ++-- 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/component/axis.js b/src/component/axis.js index dfd9115f7..e263c139b 100644 --- a/src/component/axis.js +++ b/src/component/axis.js @@ -108,11 +108,11 @@ define(function (require) { * 构造函数默认执行的初始化方法,也用于创建实例后动态修改 * @param {Object} newZr * @param {Object} newOption - * @param {Object} newCompoent + * @param {Object} newComponent */ - init : function (newOption, newCompoent, newAxisType) { + init : function (newOption, newComponent, newAxisType) { this.option = newOption || this.option; - this.component = newCompoent || this.component; + this.component = newComponent || this.component; this.axisType = newAxisType || this.axisType; this._axisList = []; diff --git a/src/component/categoryAxis.js b/src/component/categoryAxis.js index 6969b60ad..2f65b888e 100644 --- a/src/component/categoryAxis.js +++ b/src/component/categoryAxis.js @@ -147,7 +147,10 @@ define(function (require) { return interval; }, - + + /** + * 绘制图形 + */ _buildShape : function () { // 标签文字格式化 this._labelData = this._reformLabel(); diff --git a/src/component/dataView.js b/src/component/dataView.js index 650304afb..c6cd0fc45 100644 --- a/src/component/dataView.js +++ b/src/component/dataView.js @@ -60,7 +60,6 @@ define(function (require) { this.option = newOption; - this._tDom.innerHTML = '

' + (lang[0] || this._lang[0]) diff --git a/src/component/dataZoom.js b/src/component/dataZoom.js index b6b340407..be22e604d 100644 --- a/src/component/dataZoom.js +++ b/src/component/dataZoom.js @@ -1010,8 +1010,8 @@ define(function (require) { }, init : function (newOption, newComponent) { - this.option = newOption; - this.component = newComponent; + this.option = newOption || this.option; + this.component = newComponent || this.component; this._fillerSize = 28; // 控件大小,水平布局为高,纵向布局为宽 this._handleSize = 8; // 手柄大小 diff --git a/src/component/grid.js b/src/component/grid.js index 595ffd45c..d6320947d 100644 --- a/src/component/grid.js +++ b/src/component/grid.js @@ -81,7 +81,6 @@ define(function (require) { ) { this.clear(); this.option = newOption || this.option; - this.option.grid = this.reformOption(this.option.grid); var gridOption = this.option.grid; diff --git a/src/component/polar.js b/src/component/polar.js index 1aeca5850..b5dccf622 100644 --- a/src/component/polar.js +++ b/src/component/polar.js @@ -899,8 +899,8 @@ define(function (require) { * 刷新 */ refresh : function (newOption) { - if (newOption || newComponent) { - this.option = newOption || this.option; + if (newOption) { + this.option = newOption; this.polar = this.option.polar; this.series = this.option.series; } diff --git a/src/component/toolbox.js b/src/component/toolbox.js index 7575595e5..705e09d95 100644 --- a/src/component/toolbox.js +++ b/src/component/toolbox.js @@ -1049,8 +1049,8 @@ define(function (require) { newOption.toolbox.padding = this.reformCssArray( newOption.toolbox.padding ); - this.option = newOption; - this.component = newComponent; + this.option = newOption || this.option; + this.component = newComponent || this.component; this.shapeList = []; -- GitLab