angular2-chartjs icon indicating copy to clipboard operation
angular2-chartjs copied to clipboard

Annotation integration

Open akrish70 opened this issue 2 years ago • 0 comments

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

akrish70 avatar Sep 05 '23 14:09 akrish70