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

Chart not showing yAxis if draw after Sparkline #40

Closed
ludovicthomas opened this issue Aug 16, 2018 · 3 comments
Closed

Chart not showing yAxis if draw after Sparkline #40

ludovicthomas opened this issue Aug 16, 2018 · 3 comments

Comments

@ludovicthomas
Copy link

It seems to have an issue when a Sparkline chart is rendered first in a page, and then after a "classic" chart is rendered.

The "classic" chart will not display the yAxis, even if we force it with options, or changing properties.

I have created a CodePen to show the issue: https://codepen.io/lthomas/pen/djBedE
At the end of the JS section, there are the two lines that can be reversed to reproduced the issue:

By rendering the sparkline after the chart, everything looks fine.

chart.render();
sparkline.render();

cleanshot 2018-08-16 at 18 23 59

By rendering the sparkline before the chart, the chart does'nt display the yAxis.

sparkline.render();
chart.render();

cleanshot 2018-08-16 at 18 24 10

@junedchhipa
Copy link
Contributor

I looked at the demo, very strange!
I will get back to work to look more into it.

@junedchhipa
Copy link
Contributor

Fixed it. I was setting sparklines default options where I disabled labels for sparklines, and that was causing the issue.

@ludovicthomas
Copy link
Author

Amazing! 🥇You are quick to fix issues! Thanks a lot.

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