提交 64f2cb63 编写于 作者: O Ovilia

fix(legend): fix radar legend

上级 b083c1eb
......@@ -160,8 +160,7 @@ class RadarSeriesModel extends SeriesModel<RadarSeriesOption> {
// areaStyle: {
// },
// itemStyle: {}
symbol: 'emptyCircle',
symbolSize: 4
symbolSize: 8
// symbolRotate: null
};
}
......
......@@ -32,13 +32,12 @@ export function install(registers: EChartsExtensionInstallRegisters) {
seriesType: 'radar',
reset: function (seriesModel: RadarSeriesModel) {
const data = seriesModel.getData();
let symbol = data.getVisual('symbol');
// Use roundRect if no symbol type
(!symbol || symbol === 'none') && (symbol = 'roundRect');
// itemVisual symbol is for selected data
data.each(function (idx) {
data.setItemVisual(idx, 'legendSymbol', symbol);
data.setItemVisual(idx, 'legendSymbol', 'roundRect');
});
// visual is for unselected data
data.setVisual('legendSymbol', 'roundRect');
}
})
}
\ No newline at end of file
......@@ -315,6 +315,9 @@ function symbolPathSetColor(this: ECSymbol, color: ZRColor, innerColor?: string)
// TODO Same width with lineStyle in LineView
symbolStyle.lineWidth = 2;
}
else if (this.shape.symbolType === 'line') {
symbolStyle.stroke = color;
}
else {
symbolStyle.fill = color;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册