Vue-chartjs: Setting global defaults

Created on 21 Nov 2017  ยท  2Comments  ยท  Source: apertureless/vue-chartjs

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
duplicate โ“ question

Most helpful comment

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

All 2 comments

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tirke picture Tirke  ยท  4Comments

ihrankouski picture ihrankouski  ยท  3Comments

Sykomaniac picture Sykomaniac  ยท  3Comments

Scalpel78 picture Scalpel78  ยท  4Comments

humanismusic picture humanismusic  ยท  3Comments