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

fix formatter tooltip can't get value in sankey diagram #11459 #11752

Merged
merged 2 commits into from Dec 2, 2019

Conversation

deqingli
Copy link
Member

@deqingli deqingli commented Dec 1, 2019

Fix #11459.

// Override Series.getDataParams()
getDataParams: function (dataIndex, dataType) {
var params = SankeySeries.superCall(this, 'getDataParams', dataIndex, dataType);
if (!params.value && dataType === 'node') {
Copy link
Contributor

@pissang pissang Dec 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use

if (params.value != null && dataType === 'node')

To avoid 0 value can't enter this condition issue.

Copy link
Member Author

@deqingli deqingli Dec 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, thanks. Frankly, I forget the special value 0. But I think it should be:

if (params.value == null && dataType === 'node')

because vlaue 0 shoule not be override

pissang
pissang approved these changes Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing total value of node in the formatter of sankey
3 participants