1👍
Looking at the documentation for angular-chart.js, it looks like you can configure base options in an angular.config()
function. Just import ChartJsProvider
and follow the code below.
(function (ChartJsProvider) {
ChartJsProvider.setOptions({ colors : [ '#803690', '#00ADF9', '#DCDCDC', '#46BFBD', '#FDB45C', '#949FB1', '#4D5360'] });
});
If this isn’t what you’re looking for, and you just want to extract a config object out of your controller and have it imported, look into angular.value()
.
- Chartjs-How to filter chart.js with datepicker?
- Chartjs-Can i use crosshairs with OHLC/candlestick charts using ChartJS
Source:stackexchange.com