提交 5b98664e 编写于 作者: L lang

Fix magicType bug caused by xAxisIndex, yAxisIndex

上级 f275b2e5
......@@ -118,13 +118,19 @@ define(function(require) {
var categoryAxis = coordSys.getAxesByScale('ordinal')[0];
if (categoryAxis) {
var axisDim = categoryAxis.dim;
var axisIndex = seriesModel.get(axisDim + 'AxisIndex');
var axisKey = axisDim + 'Axis';
newOption[axisKey] = newOption[axisKey] || [];
var axisType = axisDim + 'Axis';
var axisModel = ecModel.queryComponents({
mainType: axisType,
index: seriesModel.get(name + 'Index'),
id: seriesModel.get(name + 'Id')
})[0];
var axisIndex = axisModel.componentIndex;
newOption[axisType] = newOption[axisType] || [];
for (var i = 0; i <= axisIndex; i++) {
newOption[axisKey][axisIndex] = newOption[axisKey][axisIndex] || {};
newOption[axisType][axisIndex] = newOption[axisType][axisIndex] || {};
}
newOption[axisKey][axisIndex].boundaryGap = type === 'bar' ? true : false;
newOption[axisType][axisIndex].boundaryGap = type === 'bar' ? true : false;
}
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册