You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/03/30 03:53:33 UTC
[GitHub] [echarts] pissang commented on a change in pull request #16767: feat(sankey): `sankey` support `edgeLabel`
pissang commented on a change in pull request #16767:
URL: https://github.com/apache/echarts/pull/16767#discussion_r838093092
##########
File path: src/chart/sankey/SankeyView.ts
##########
@@ -193,7 +193,9 @@ class SankeyView extends ChartView {
cpy2: cpy2
});
- curve.useStyle(lineStyleModel.getItemStyle());
+ const style = lineStyleModel.getItemStyle();
+ curve.useStyle(style);
+ edgeData.setItemVisual(idx, 'style', style);
Review comment:
It's better to put visual logic in `sankeyVisual.ts`
##########
File path: src/chart/sankey/SankeyView.ts
##########
@@ -220,6 +222,15 @@ class SankeyView extends ChartView {
}
}
+ setLabelStyle(
+ curve, getLabelStatesModels(edgeModel, 'edgeLabel'),
+ {
+ labelFetcher: seriesModel,
+ labelDataIndex: edge.dataIndex,
+ defaultText: `${edgeModel.get('value')}`
Review comment:
template string is unnecessary here.
--
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: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org