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

Sankey graph deformation on div resize when using data with a -> a pattern #13705

Closed
romanbitca opened this issue Jun 12, 2020 · 6 comments · Fixed by #16082
Closed

Sankey graph deformation on div resize when using data with a -> a pattern #13705

romanbitca opened this issue Jun 12, 2020 · 6 comments · Fixed by #16082
Assignees

Comments

@romanbitca
Copy link

Expected behaviour

Smooth graph redraw.

Actual behaviour

A part of graph is deformed and alighted to right.
GIF demo included.
ScreenFlow

Function used to redraw

resize () { const { sankey } = this.$refs if (sankey) { clearTimeout(this.timeoutID) this.timeoutID = setTimeout(() => { sankey.chart.setSize(null) sankey.chart.redraw() }, 200) } }

Product version

"highcharts": "^7.1.2",
"highcharts-vue": "^1.3.5",

Affected browser(s)

All browsers.
Gif demo is recorded on Chrome.

@circleci-mu circleci-mu added this to To do in Development-Flow Jun 12, 2020
@sebastianbochan
Copy link
Contributor

Hi @romanbitca,
Thank you for reporting. Could you share a live demo of your chart? It will allow us to reproduce and debug the problem.

@romanbitca
Copy link
Author

romanbitca commented Jun 18, 2020

Here it is:
https://codesandbox.io/s/eloquent-chaplygin-y3hqz?file=/src/App.vue

Try slowly to resize the sandbox window.

@pawelfus
Copy link
Contributor

Thank you for the demo @romanbitca

Simplified demo:
https://jsfiddle.net/BlackLabel/19d7jrbo/

This is caused by self-referencing node:

      [
        31252,
        31252,
        199204
      ],

When removed - works fine.

@pawelfus pawelfus changed the title Sankey graph deformation on div resize Sankey graph deformation on div resize when using data with a -> a pattern Jun 19, 2020
@romanbitca
Copy link
Author

We know that self-referencing node produces this bug. And I need to display this ‘loop’.
Any solution?

@pawelfus
Copy link
Contributor

pawelfus commented Jun 22, 2020

I think there is a workaround you can try to implement, while this bug is open: set fixed column for a specific node:

nodes: [{
  id: 31252,
  column: ...
}]

I said it's not an easy task, because it will be tricky to calculate the column. Demo: https://jsfiddle.net/BlackLabel/19d7jrbo/3/

Just realized that issue was wrongly tagged - fixed.

Simplified demo: https://jsfiddle.net/BlackLabel/tdymnhvj/1/
Simplified demo with workaround: https://jsfiddle.net/BlackLabel/tdymnhvj/2/

@romanbitca
Copy link
Author

Ok, thank you.
Waiting for bug fix.

@khlieng khlieng self-assigned this Jul 22, 2021
Development-Flow automation moved this from To do to Done Aug 13, 2021
@circleci-mu circleci-mu added the Flow: Done status label Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

5 participants