You must be logged in to post your query.
Home › Forums › Chart Support › store charts in external js file
Tagged: js file charts
Is it possible to put all the charts var chart = new CanvasJS.Chart(“Chart1”, {…}) var chart = new CanvasJS.Chart(“Chart2”, {…}) in en external js file and then use it in multiple pages? I didn’t get it to work though :/
You can store the complete chart as a function in external JS file. Load that JS file and call the function in multiple HTML pages where you like to show chart. Check this example.
You must be logged in to reply to this topic. Login/Register