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

x axis multiline renders different results on init vs. on resize vs. on data toggle #2346

Open
jcsmorais opened this issue Apr 16, 2018 · 1 comment

Comments

@jcsmorais
Copy link
Contributor

jcsmorais commented Apr 16, 2018

As you can see on my screen capture above (and code pen) when you have a bar chart with categories with multiline enabled there seems to be a different behavior between when you load the chart and when you resize the screen.

On my code pen you can see that I'm doing a couple sequences of refresh page + change screen width. Do notice that even though I'm changing the screen width it does not affect the width of the chart which is expected, 'cause I have a max-widthset, but I guess it does lead to a resize being triggered which in turn leads to the long category text being changed from two tspan elements to three which makes the category text look way better since it stops looking as if it's been squeezed in there.

It seems this might be related with my custom font size and that it might be that for some reason that's only getting picked up on resize and not on chart initialization.

Side note: after the resize that leads to the three tspans being generated, if you toggle the visibility of the data by clicking ratios legend, you'll go back to the original structure where two tspans are rendered instead of three.

Thoughts?

@jcsmorais jcsmorais changed the title x axis multiline renders different results on init vs. on resize x axis multiline renders different results on init vs. on resize vs. on data toggle Apr 16, 2018
@jcsmorais
Copy link
Contributor Author

@masayuki0812 any idea on this one please?

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

1 participant