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

Sunburst : doesn't recenter when redrawn #1490

Closed
Frozenlock opened this issue Oct 6, 2018 · 4 comments
Closed

Sunburst : doesn't recenter when redrawn #1490

Frozenlock opened this issue Oct 6, 2018 · 4 comments

Comments

@Frozenlock
Copy link
Contributor

Behavior

Expected : the sunburst chart should recenter itself like the pie-chart when redrawn width different width/height.

Actual : the sunburst chart doesn't move.

Potential cause

The sunburst chart doesn't have a cx/cy based transition in the drawChart function like the pie-chart does.
Pie chart : https://github.com/dc-js/dc.js/blob/develop/src/pie-chart.js#L124
Sunburst chart : https://github.com/dc-js/dc.js/blob/develop/src/sunburst-chart.js#L94

@gordonwoodhull
Copy link
Contributor

Hi @Frozenlock, would you care to give this a try and see if the proposed fix works?

I believe you are correct about what this line does.

@gordonwoodhull
Copy link
Contributor

We also require a test - we need to make a new resizing example. I can handle that if you care to contribute the fix.

@Frozenlock
Copy link
Contributor Author

I'll let you handle the resizing example.
I don't program in JS... simply read it once in a while.

@Frozenlock
Copy link
Contributor Author

By the way, I noticed that pie chart doesn't resize as cleanly as the other charts (including Sunburst).
Its radius appears to update immediately rather than being animated.
Not sure if it's worthy of opening an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants