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

Added 'devicePixelRatio' option to override the window's DPR setting #4270

Merged
merged 3 commits into from Jun 4, 2017

Conversation

OlduwanSteve
Copy link
Contributor

I am using chartjs for an application where the charts are baked to PDF server-side, with the eventual goal of printing them. I think this is quite common. Even for people using chartjs on the client, they may want to print the charts direct from the browser.

In either case it can be useful to force the charts to render at a higher DPR than the default window.devicePixelRatio so they look good at higher printer DPIs.

I found the existing code to deal with retina displays and I've extended it a bit to accept an override.

I could not get the docs task to run, but I think I've conformed to the style of nearby docs. Please let me know if I need to change anything.

@etimberg
Copy link
Member

Thanks for submitting this @OlduwanSteve. I like that you added some good documentation with your new config option!

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

Successfully merging this pull request may close these issues.

None yet

3 participants