Set global defaults to ChartJs

Posted on December 18, 2021

Here the tip:

import Chart from 'chart.js/auto'

Chart.defaults.backgroundColor = '#000'
Chart.defaults.borderColor = '#f00'
Chart.defaults.font.family = 'sans'