提交 29cad06f 编写于 作者: S susiwen8

Set sankey item visual

上级 050ad8ca
...@@ -49,9 +49,14 @@ export default function (ecModel: GlobalModel) { ...@@ -49,9 +49,14 @@ export default function (ecModel: GlobalModel) {
const mapValueToColor = mapping.mapValueToVisual(node.getLayout().value); const mapValueToColor = mapping.mapValueToVisual(node.getLayout().value);
const customColor = node.getModel<SankeyNodeItemOption>().get(['itemStyle', 'color']); const customColor = node.getModel<SankeyNodeItemOption>().get(['itemStyle', 'color']);
customColor != null if (customColor != null) {
? node.setVisual('color', customColor) node.setVisual('color', customColor);
: node.setVisual('color', mapValueToColor); node.setVisual('style', {fill: customColor});
}
else {
node.setVisual('color', mapValueToColor);
node.setVisual('style', {fill: mapValueToColor});
}
}); });
} }
}); });
......
...@@ -782,7 +782,7 @@ class TooltipView extends ComponentView { ...@@ -782,7 +782,7 @@ class TooltipView extends ComponentView {
tooltipModel, positionExpr, x, y, tooltipContent, params, el tooltipModel, positionExpr, x, y, tooltipContent, params, el
); );
tooltipContent.setContent(html, markers, tooltipModel); tooltipContent.setContent(html, markers, tooltipModel);
tooltipContent.show(tooltipModel, el?.style.fill || nearPoint.color); tooltipContent.show(tooltipModel, nearPoint.color);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册