diff --git a/src/component/axis.js b/src/component/axis.js index dfd9115f7ff752c943803f8dcf7a1c0f42d55cff..e263c139b1f30afe64b882af2bc88d799435fafd 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 6969b60ad4879e906a0348bb741b609e1f29df93..2f65b888e55888acc0606a91db56b898bdf95ba2 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 650304afb7ad833e15d0e544a83f016bef1e8fee..c6cd0fc459fe83d976bc97db629cd36be37b5c8a 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 b6b34040796239acc05e285df8bad418dbf083c4..be22e604d8cc49b3abfc2792992afe2f7e6d4dc3 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 595ffd45c967d01f87255c7d793bb38b190135a9..d6320947d4b96926c496826d602986b10cef0be3 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 1aeca5850c9384e25fc80d28d953d6166abf563c..b5dccf622797d2454f77f3d60d6c57c6c7df87b8 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 7575595e541348b2b2b2b2c8e8fe94a6b338fe95..705e09d95c35079b197f235d8454c6d98f898aec 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 = [];