提交 582cd73a 编写于 作者: P pissang

fix(bar): fix bar background incorrect on polar

上级 d7edf07d
......@@ -144,7 +144,10 @@ export default echarts.extendChartView({
var bgLayout = getLayout[coord.type](data, dataIndex);
var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout);
bgEl.useStyle(backgroundModel.getBarItemStyle());
bgEl.setShape('r', barBorderRadius);
// Only cartesian2d support borderRadius.
if (coord.type === 'cartesian2d') {
bgEl.setShape('r', barBorderRadius);
}
bgEls[dataIndex] = bgEl;
}
......@@ -181,7 +184,10 @@ export default echarts.extendChartView({
if (drawBackground) {
var bgEl = oldBgEls[oldIndex];
bgEl.useStyle(backgroundModel.getBarItemStyle());
bgEl.setShape('r', barBorderRadius);
// Only cartesian2d support borderRadius.
if (coord.type === 'cartesian2d') {
bgEl.setShape('r', barBorderRadius);
}
bgEls[newIndex] = bgEl;
var bgLayout = getLayout[coord.type](data, newIndex);
......
......@@ -227,7 +227,7 @@ under the License.
var chart = testHelper.create(echarts, 'main1', {
option: option,
title: [
'large mode'
'Background with large render mode.'
]
});
});
......@@ -299,7 +299,7 @@ under the License.
var chart = testHelper.create(echarts, 'main2', {
option: option,
title: [
'normal bars'
'Background with normal render mode.'
]
});
});
......@@ -345,7 +345,7 @@ under the License.
var chart = testHelper.create(echarts, 'main3', {
option: option,
title: [
'polar bars'
'Bar background on radial polar'
]
});
});
......@@ -392,7 +392,7 @@ under the License.
var chart = testHelper.create(echarts, 'main4', {
option: option,
title: [
'polar bars'
'Bar background on tangential polar'
]
});
});
......@@ -446,7 +446,7 @@ under the License.
var chart = testHelper.create(echarts, 'main5', {
option: option,
title: [
'polar bars'
'Multiple bar series with background on radial polar'
]
});
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册