提交 24c01c13 编写于 作者: C ChepteaCatalin 提交者: chepteac

fix(legend): inherit legend rich text color from legend's options. close #18196

上级 8120aaba
......@@ -413,16 +413,18 @@ class LegendView extends ComponentView {
content = formatter(name);
}
const inactiveColor = legendItemModel.get('inactiveColor');
const textColor = isSelected
? textStyleModel.getTextColor() : legendItemModel.get('inactiveColor');
itemGroup.add(new graphic.Text({
style: createTextStyle(textStyleModel, {
text: content,
x: textX,
y: itemHeight / 2,
fill: isSelected ? textStyleModel.getTextColor() : inactiveColor,
fill: textColor,
align: textAlign,
verticalAlign: 'middle'
})
}, {inheritColor: textColor})
}));
// Add a invisible rect to increase the area of mouse hover
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册