mustcanbedo commented on code in PR #21081:
URL: https://github.com/apache/echarts/pull/21081#discussion_r2218735585
##########
src/chart/radar/RadarView.ts:
##########
@@ -215,53 +215,79 @@ class RadarView extends ChartView {
polygon.useStyle(
zrUtil.defaults(
- areaStyleModel.getAreaStyle(),
+ itemModel.getModel('areaStyle').getAreaStyle(),
{
fill: color,
- opacity: 0.7,
decal: itemStyle.decal
}
)
);
- const emphasisModel = itemModel.getModel('emphasis');
- const itemHoverStyle =
emphasisModel.getModel('itemStyle').getItemStyle();
- symbolGroup.eachChild(function (symbolPath: RadarSymbol) {
+ symbolGroup.eachChild(function(symbolPath: RadarSymbol) {
if (symbolPath instanceof ZRImage) {
- const pathStyle = symbolPath.style;
- symbolPath.useStyle(zrUtil.extend({
- // TODO other properties like x, y ?
- image: pathStyle.image,
- x: pathStyle.x, y: pathStyle.y,
- width: pathStyle.width, height: pathStyle.height
- }, itemStyle));
+ const ps = symbolPath.style
+ symbolPath.useStyle(
+ zrUtil.extend(
+ {
+ image: ps.image,
+ x: ps.x,
+ y: ps.y,
+ width: ps.width,
+ height: ps.height,
+ },
+ itemStyle,
+ ),
+ )
+ } else {
+ symbolPath.useStyle(itemStyle)
+ symbolPath.setColor(color)
+ symbolPath.style.strokeNoScale = true
}
- else {
- symbolPath.useStyle(itemStyle);
- symbolPath.setColor(color);
- symbolPath.style.strokeNoScale = true;
+ const emphasisModel = itemModel.getModel('emphasis')
+ const hoverStyle =
emphasisModel.getModel('itemStyle').getItemStyle()
+ symbolPath.ensureState('emphasis').style =
zrUtil.clone(hoverStyle)
+ let txt =
data.getStore().get(data.getDimensionIndex(symbolPath.__dimIdx), idx)
+ if (txt == null || isNaN(txt as number)) {
+ txt = ''
Review Comment:
Hello, I don't understand the meaning of this review
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]