Skip to content
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

Missing total value of node in the formatter of sankey #11459

Open
elephantme opened this issue Oct 22, 2019 · 9 comments · Fixed by #11752
Open

Missing total value of node in the formatter of sankey #11459

elephantme opened this issue Oct 22, 2019 · 9 comments · Fixed by #11752
Assignees
Labels
bug difficulty: easy Issues that can be fixed more easily than the average. topic: sankey topic: tooltip
Milestone

Comments

@elephantme
Copy link

elephantme commented Oct 22, 2019

Version

4.4.0

Steps to reproduce

官方示例上只使用了自定义formatter

myChart.showLoading();
$.get(ROOT_PATH   'data/asset/data/energy.json', function (data) {
    myChart.hideLoading();

    myChart.setOption(option = {
        title: {
            text: 'Sankey Diagram'
        },
        draggable: false,
        tooltip: {
            trigger: 'item',
            formatter: function (params) {
                // console.log(params)
                if (params.dataType == 'node') {
                    console.log(params.value)
                }
            },
            // triggerOn: 'mousemove'
        },
        series: [
            {
                type: 'sankey',
                data: data.nodes,
                links: data.links,
                focusNodeAdjacency: 'allEdges',
                itemStyle: {
                    normal: {
                        borderWidth: 1,
                        borderColor: '#aaa'
                    }
                },
                lineStyle: {
                    normal: {
                        color: 'source',
                        curveness: 0.5
                    }
                }
            }
        ]
    });
});

What is expected?

输出总数(params.value)

What is actually happening?

undefined


默认是有总数的,使用自定义得不到该数据

@deqingli deqingli self-assigned this Oct 29, 2019
@deqingli deqingli added topic: sankey topic: tooltip pending We are not sure about whether this is a bug/new feature. labels Oct 29, 2019
@deqingli deqingli added this to the 4.7.0 milestone Nov 7, 2019
deqingli added a commit to deqingli/incubator-echarts that referenced this issue Nov 29, 2019
deqingli added a commit that referenced this issue Dec 2, 2019
fix formatter tooltip can't get value in sankey diagram #11459
@deqingli deqingli added bug and removed pending We are not sure about whether this is a bug/new feature. labels Dec 2, 2019
@deqingli deqingli closed this as completed Dec 2, 2019
@deqingli deqingli reopened this Dec 2, 2019
@pissang pissang changed the title 桑基图自定义tooltip时,node节点数据没有总数 Missing total value of node in the formatter of sankey Dec 4, 2019
@deqingli deqingli closed this as completed Dec 4, 2019
@maple5233
Copy link

@deqingli 这个bug 4.5.0依旧存在呀

@Ovilia
Copy link
Contributor

Ovilia commented Feb 21, 2020

@maple5233 这一改动会在未来的 4.7.0 中发布

@ytsukanov
Copy link

Gentlemen, was this not fixed yet?

sankey-bug

@Ovilia Ovilia reopened this Mar 25, 2022
@Ovilia Ovilia added this to the 5.4 milestone Mar 25, 2022
@Ovilia Ovilia added the difficulty: easy Issues that can be fixed more easily than the average. label Mar 25, 2022
@apache apache deleted a comment from echarts-bot bot Mar 25, 2022
@Ovilia
Copy link
Contributor

Ovilia commented Mar 25, 2022

I tested it and it remains to be a bug in the current version.

@Ovilia Ovilia modified the milestones: 5.4, TBD Sep 1, 2022
@nabiila-29
Copy link

Gentlemen, was this not fixed yet?

sankey-bug

Hi, I tried to do the same thing. Add '{c}' as value for label. It works on tooltip but fails in label. Has this issue been solved?

image

@Sletheren
Copy link

anything about this? the issue still remains.

@ThePhoenixBird
Copy link

Can we get an update on this issue?

@evertoncolling
Copy link

Any news on this? Stumbled upon this issue today 😅

@juanitoddd
Copy link

Hello, I have the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug difficulty: easy Issues that can be fixed more easily than the average. topic: sankey topic: tooltip
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants