I'm working with Angular (v9), ng2-charts, chart.js (v2.9), and chartjs-plugin-datalabels
I got my chart displaying with labels, wonderful. Now I want to use some of the options to color the labels and position them.
I'm importing the labels like so:
import * as pluginDataLabels from 'chartjs-plugin-datalabels';
This is working fine:
public barChartOptions = {
maintainAspectRatio: false,
scaleShowVerticalLines: false,
responsive: true,
plugins: {
pluginDataLabels
}
This is not:
public barChartOptions = {
maintainAspectRatio: false,
scaleShowVerticalLines: false,
responsive: true,
plugins: {
pluginDataLabels: {
color: 'blue'
}
}
Any help on this is greatly appreciated. When I attempt to add any options the labels simply disappear.
