-
Notifications
You must be signed in to change notification settings - Fork 19.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Sankey桑基图 Label formmater中的value是undefined,而Tooltip缺有值 #18212
Labels
Comments
我在Label formmater的 params中 拿不到value 是undefined,该如何做呢? |
此Bug我已解决,代码如下: 源文件:echarts.js
if (labelFetcher) {
/*
* 2023-01-30
* 添加如下代码,用于解决桑基图Label Value为undefined的问题
*/
let extendParams = null;
if (labelFetcher instanceof SankeySeriesModel && value != undefined && value != null) {
extendParams = {interpolatedValue:value}
}
baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex, normalModel && normalModel.get('formatter'), interpolatedValue != null ? {
interpolatedValue: interpolatedValue
} : extendParams);
}
setLabelStyle(rect, getLabelStatesModels(itemModel), {
labelFetcher: seriesModel,
labelDataIndex: node.dataIndex,
defaultText: node.id,
value: node.getLayout().value // 2023-01-30 解决:桑基图Label value是undefined的问题,此处将真实值抛出去
}); |
Thanks, Could you submit a PR? |
I'm a little busy these two days, please take some time to deal with it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
5.4.1
Link to Minimal Reproduction
No response
Steps to Reproduce
桑基图中 Label Formater的value为空
而Tooltip Formatter的value值 是有的 且与实际相符
是否可以将这两个值统一一下,两边都可以拿到值,而不是一边有值,一遍undefined
Current Behavior
最终,我要实现的效果就是,在图上 Label 显示的value值 和 Tooltip的value值 是一致的,但我现在做不到。
Expected Behavior
最终,我要实现的效果就是,在图上 Label 显示的value值 和 Tooltip的value值 是一致的,但我现在做不到。
Environment
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: