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

Graphs keep increasing height on tablet #89

Closed
dennissiemensma opened this issue Mar 13, 2016 · 2 comments
Closed

Graphs keep increasing height on tablet #89

dennissiemensma opened this issue Mar 13, 2016 · 2 comments
Milestone

Comments

@dennissiemensma
Copy link
Member

This weekend I found my old and (presumed) broken iPad 1. I tried recharging it before wanting to smash it and suddenly, after years of disfunctioning, it resetted and works again!

So I tried to browse the interface using the tablet and it seems that graphs are randomly resizing in height.

After searching it seems a common issue on ChartJS, but with lots of workarounds:
chartjs/Chart.js#56

@dennissiemensma dennissiemensma added this to the 0.14 (β) milestone Mar 13, 2016
@dennissiemensma
Copy link
Member Author

This seems the best solution for this:

chartjs/Chart.js#56 (comment)

@dennissiemensma
Copy link
Member Author

Fixed by setting a hardcoded height on the canvas' parent element and then executing this before every render:
ctx.canvas.height = $("#CHART-ID").parent().height();

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