diff --git a/src/chart/helper/whiskerBoxCommon.js b/src/chart/helper/whiskerBoxCommon.js index ac563fb3c5..7a7312c359 100644 --- a/src/chart/helper/whiskerBoxCommon.js +++ b/src/chart/helper/whiskerBoxCommon.js @@ -58,6 +58,7 @@ define(function(require) { zrUtil.isArray(item) && item.unshift(index); }); + var defaultValueDimensions = this.defaultValueDimensions; var dimensions = [{ name: baseAxisDim, otherDims: { @@ -66,12 +67,14 @@ define(function(require) { dimsDef: ['base'] }, { name: otherAxisDim, - dimsDef: this.defaultValueDimensions.slice() + dimsDef: defaultValueDimensions.slice() }]; dimensions = completeDimensions(dimensions, data, { encodeDef: this.get('encode'), - dimsDef: this.get('dimensions') + dimsDef: this.get('dimensions'), + // Consider empty data entry. + dimCount: defaultValueDimensions.length + 1 }); var list = new List(dimensions, this); diff --git a/test/candlestick-empty.html b/test/candlestick-empty.html new file mode 100644 index 0000000000..92d37a01bf --- /dev/null +++ b/test/candlestick-empty.html @@ -0,0 +1,146 @@ + + + + + + + + + + +
+
+ + + \ No newline at end of file