Thanks for your sample, it was helpful for me.
And could you also help provide solution for using CanvasJS in React+Webpack+Typescript, actually the check of Typescript could not support “new CanvasJS.Chart” without define “CanvasJS” first.