You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "TommysLee (via GitHub)" <gi...@apache.org> on 2023/01/30 08:06:28 UTC
[GitHub] [echarts] TommysLee opened a new issue, #18212: [Bug] Sankey桑基图 Label formmater中的value是undefined,而Tooltip缺有值
TommysLee opened a new issue, #18212:
URL: https://github.com/apache/echarts/issues/18212
### 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
```markdown
- OS:
- Browser:
- Framework:
```
### Any additional comments?
_No response_
--
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.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
[GitHub] [echarts] TommysLee commented on issue #18212: [Bug] Sankey桑基图 Label formmater中的value是undefined,而Tooltip缺有值
Posted by "TommysLee (via GitHub)" <gi...@apache.org>.
TommysLee commented on issue #18212:
URL: https://github.com/apache/echarts/issues/18212#issuecomment-1408276938
此Bug我已解决,代码如下:
**源文件:echarts.js**
> 代码行:15239 修改为如下代码:
```javascript
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);
}
```
> 代码行:65439 修改为如下代码:
```javascript
setLabelStyle(rect, getLabelStatesModels(itemModel), {
labelFetcher: seriesModel,
labelDataIndex: node.dataIndex,
defaultText: node.id,
value: node.getLayout().value // 2023-01-30 解决:桑基图Label value是undefined的问题,此处将真实值抛出去
});
```
--
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
[GitHub] [echarts] TommysLee commented on issue #18212: [Bug] Sankey桑基图 Label formmater中的value是undefined,而Tooltip缺有值
Posted by "TommysLee (via GitHub)" <gi...@apache.org>.
TommysLee commented on issue #18212:
URL: https://github.com/apache/echarts/issues/18212#issuecomment-1408156837
我在Label formmater的 params中 拿不到value 是undefined,该如何做呢?
--
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
[GitHub] [echarts] susiwen8 commented on issue #18212: [Bug] Sankey桑基图 Label formmater中的value是undefined,而Tooltip缺有值
Posted by "susiwen8 (via GitHub)" <gi...@apache.org>.
susiwen8 commented on issue #18212:
URL: https://github.com/apache/echarts/issues/18212#issuecomment-1411338517
Thanks, Could you submit a PR?
--
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
[GitHub] [echarts] TommysLee commented on issue #18212: [Bug] Sankey桑基图 Label formmater中的value是undefined,而Tooltip缺有值
Posted by "TommysLee (via GitHub)" <gi...@apache.org>.
TommysLee commented on issue #18212:
URL: https://github.com/apache/echarts/issues/18212#issuecomment-1411399325
I'm a little busy these two days, please take some time to deal with it.
Thanks
--
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
[GitHub] [echarts] Ovilia closed issue #18212: [Bug] Sankey桑基图 Label formmater中的value是undefined,而Tooltip缺有值
Posted by "Ovilia (via GitHub)" <gi...@apache.org>.
Ovilia closed issue #18212: [Bug] Sankey桑基图 Label formmater中的value是undefined,而Tooltip缺有值
URL: https://github.com/apache/echarts/issues/18212
--
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