diff --git a/doc/doc-en.html b/doc/doc-en.html
index e9133939aa..9a7d6df413 100644
--- a/doc/doc-en.html
+++ b/doc/doc-en.html
@@ -2054,6 +2054,12 @@
axis universal
type of the coordinate axis. By default, x-axis is 'category', y-axis is 'value'. |
+
+ {boolean} show |
+ true |
+ universal |
+ Specifies whether to show axis. Valid values are: true (show) | false (hide). |
+
{string} position |
'bottom' | 'left' |
diff --git a/doc/doc.html b/doc/doc.html
index 7d38512ebd..34c235241f 100644
--- a/doc/doc.html
+++ b/doc/doc.html
@@ -2054,6 +2054,12 @@ axis 通用
坐标轴类型,横轴默认为类目型'category',纵轴默认为数值型'value' |
+
+ {boolean} show |
+ true |
+ 通用 |
+ 显示策略,可选为:true(显示) | false(隐藏) |
+
{string} position |
'bottom' | 'left' |
diff --git a/src/component/categoryAxis.js b/src/component/categoryAxis.js
index 7944958439..c4b59447b7 100644
--- a/src/component/categoryAxis.js
+++ b/src/component/categoryAxis.js
@@ -162,7 +162,9 @@ define(function (require) {
_buildShape : function () {
// 标签显示的挑选间隔
this._interval = this._getInterval();
-
+ if (!this.option.show) {
+ return;
+ }
this.option.splitArea.show && this._buildSplitArea();
this.option.splitLine.show && this._buildSplitLine();
this.option.axisLine.show && this._buildAxisLine();
diff --git a/src/component/valueAxis.js b/src/component/valueAxis.js
index 3acc3eba20..1270cf45f8 100644
--- a/src/component/valueAxis.js
+++ b/src/component/valueAxis.js
@@ -49,9 +49,10 @@ define(function (require) {
_buildShape: function () {
this._hasData = false;
this._calculateValue();
- if (!this._hasData) {
+ if (!this._hasData || !this.option.show) {
return;
}
+
this.option.splitArea.show && this._buildSplitArea();
this.option.splitLine.show && this._buildSplitLine();
this.option.axisLine.show && this._buildAxisLine();