I am trying to use the CanvasJS library in my plugin, but the imports don’t seem to go right. I have downloaded the canvasjs.min file and the jquery.canvasjs.min file, they are both in the \external folder, which is inside the \src folder. My import statements are:
import * as canvasjsjquery from ‘./external/jquery.canvasjs.min’;
import * as CanvasJS from ‘./external/canvasjs.min’;
The error that Grafana gives is: Cannot read property ‘style’ of undefined. This error only shows up if the statement
is in the code. this.chart is the variable that should contain the CanvasJS.Chart object. Therefore, I think that this.chart is undefined.