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.defaults.global.layout is undefined #4309

Closed
acidjazz opened this issue May 31, 2017 · 0 comments
Closed

Chart.defaults.global.layout is undefined #4309

acidjazz opened this issue May 31, 2017 · 0 comments

Comments

@acidjazz
Copy link

acidjazz commented May 31, 2017

according to the documentation here

http://www.chartjs.org/docs/latest/configuration/layout.html#padding

I should be able to set default things like padding, but by default this is undefined. Not a huge deal since it still works fine via options.

simple workaround for now thanks to @simonbrunel

var global = Chart.defaults.global;
global.layout = global.layout || {};
global.layout.padding = { /* your values */ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants