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

On a 3D chart, the first call to chart.redraw() changes the size of the chart #5522

Closed
paulo-raca opened this Issue Jul 22, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@paulo-raca
Contributor

paulo-raca commented Jul 22, 2016

Expected behaviour

Chart remais the same size after redraw

Actual behaviour

The chart change size (A bit) after redraw() is called for the first time

Live demo with steps to reproduce

http://jsfiddle.net/paulo_raca/2xbjmcov/

Apparently this issue doesn't happen with fitToPlot: false

@TorsteinHonsi

This comment has been minimized.

Show comment
Hide comment
@TorsteinHonsi

TorsteinHonsi Jul 22, 2016

Collaborator

@pawelfus Any idea?

Collaborator

TorsteinHonsi commented Jul 22, 2016

@pawelfus Any idea?

@TorsteinHonsi TorsteinHonsi added the Bug label Jul 22, 2016

@jon-a-nygaard

This comment has been minimized.

Show comment
Hide comment
@jon-a-nygaard

jon-a-nygaard Jul 22, 2016

Collaborator

@TorsteinHonsi On first render when the getMargin is run the plotLeft, plotRight, plotTop, plotBottom is different from when getMargins is called on the redraw, causing a different calculated value of scale3d. The scale is later used in the perspective method which scales down all the coordinates to fit into the plotting area.

Collaborator

jon-a-nygaard commented Jul 22, 2016

@TorsteinHonsi On first render when the getMargin is run the plotLeft, plotRight, plotTop, plotBottom is different from when getMargins is called on the redraw, causing a different calculated value of scale3d. The scale is later used in the perspective method which scales down all the coordinates to fit into the plotting area.

@jon-a-nygaard jon-a-nygaard self-assigned this Jul 22, 2016

@TorsteinHonsi

This comment has been minimized.

Show comment
Hide comment
@TorsteinHonsi

TorsteinHonsi Jul 22, 2016

Collaborator

Okay it's probably because the labels aren't rendered yet then, so we don't know the exact size of the plot area.

Collaborator

TorsteinHonsi commented Jul 22, 2016

Okay it's probably because the labels aren't rendered yet then, so we don't know the exact size of the plot area.

jon-a-nygaard added a commit that referenced this issue Jul 22, 2016

@paulo-raca

This comment has been minimized.

Show comment
Hide comment
@paulo-raca

paulo-raca Aug 2, 2016

Contributor

Thanks!

Contributor

paulo-raca commented Aug 2, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment