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

Setting global defaults #258

Closed
bathyscaaf opened this issue Nov 21, 2017 · 2 comments
Closed

Setting global defaults #258

bathyscaaf opened this issue Nov 21, 2017 · 2 comments

Comments

@bathyscaaf
Copy link

I'm trying to find a way to set and use the Chart.defaults.global, but have been unsuccessful.
Ideally it would work as intended: you set global defaults that can be overridden by the options object.
Is this possible with the current vue-chartjs?

Environment

  • vue.js version: 2.5.6
  • vue-chart.js version: 3.0.0
  • npm version: 5.5.1
@apertureless
Copy link
Owner

apertureless commented Nov 21, 2017

You need to import the Chartjs object first. And then you can set the globals.

import Chart from 'chart.js'
Chart.defaults.global

also see #234

@bathyscaaf
Copy link
Author

That's one of the first things I tried. I must have missed something.

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