You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using angular 14 and chartjs 4.4.0, kind of achieved the charts based on requirement with help of angular2-chartjs.
but I'm not able to integrate or add plugins, trying to include the https://www.chartjs.org/chartjs-plugin-annotation/latest/guide/
annotation with angular2-chartjs but I'm not sure what is happening inside I'm not seeing any errors also I'm not able to see the annotations reflecting in the charts.
Registered the plugin in app.module,ts
import * as annotationPlugin from 'chartjs-plugin-annotation';
declare var Chart;
Chart.pluginService.register(annotationPlugin);
also added the annotations in the options
plugins: {
annotation: {
annotations: {
label1: {
type: 'label',
xValue: 2.5,
yValue: 60,
backgroundColor: 'red',
content: ['This is my text', 'This is my text, second line'],
font: {
size: 18
}
}
}
}
}
I have been stuck in this issue for a long time, help me on this. If not able to achieve it i have to scrap the entire work and start it fresh again in some other chatjs library provided in angular. Thanks
The text was updated successfully, but these errors were encountered:
Hi Team,
I'm using angular 14 and chartjs 4.4.0, kind of achieved the charts based on requirement with help of angular2-chartjs.
but I'm not able to integrate or add plugins, trying to include the https://www.chartjs.org/chartjs-plugin-annotation/latest/guide/
annotation with angular2-chartjs but I'm not sure what is happening inside I'm not seeing any errors also I'm not able to see the annotations reflecting in the charts.
Registered the plugin in app.module,ts
import * as annotationPlugin from 'chartjs-plugin-annotation';
declare var Chart;
Chart.pluginService.register(annotationPlugin);
also added the annotations in the options
plugins: {
annotation: {
annotations: {
label1: {
type: 'label',
xValue: 2.5,
yValue: 60,
backgroundColor: 'red',
content: ['This is my text', 'This is my text, second line'],
font: {
size: 18
}
}
}
}
}
I have been stuck in this issue for a long time, help me on this. If not able to achieve it i have to scrap the entire work and start it fresh again in some other chatjs library provided in angular. Thanks
The text was updated successfully, but these errors were encountered: