Home › forums › Using CanvasJS › Canvajs in Angular: ERROR ReferenceError: setButtonState is not defined
Tagged: ERROR ReferenceError: setButtonState is not defined
I pretty new in CanavasJS. I try use the example of the home page: https://canvasjs.com/angular-charts/ in Angular created with ng. But I get always this error at calling chart.render():
AppComponent.html:2 ERROR ReferenceError: setButtonState is not defined at n._updateOptions (canvasjs.min.js:5) at n._initialize (canvasjs.min.js:5) at n.render (canvasjs.min.js:5) at n.render (canvasjs.min.js:8) at MyGraphComponent.push../src/app/my-graph/my-graph.component.ts.MyGraphComponent.ngOnInit (my-graph.component.ts:35) at checkAndUpdateDirectiveInline (core.js:9035) at checkAndUpdateNodeInline (core.js:10299) at checkAndUpdateNode (core.js:10261) at debugCheckAndUpdateNode (core.js:10894)
@ago,
Can you kindly create and share an jsfiddle representing the issue you are facing or share a sample project over google-drive or onedrive, so that we can look into your code, understand it better and help you out?
__ Priyanka M S Team CanvasJS
I found out that this error occurs when you do an NPM install of canvas js and try to reference it from the “node_modules” folder. Download canvasjs.min.js to your assets folder and reference it from there. This will resolve the issue. Took me a while to figure this one out.
Jason
Jason,
Glad that you have figured it out :)
—- Manoj Mohan Team CanvasJS
You must be logged in to reply to this topic.