Please take a look at this documentation page for step-to-step tutorial on rendering multiple charts in a page. Documentation also includes live example that you can try out / download.
Yes, you can plot the chart as mentioned in the link. Because charts just get drawn inside any container you provide, it’s more about designing the container itself. Just design/place the container according to your requirement and pass its id to CanvasJS and chart should get plotted inside the same.
Here is simple example that I’ve created. You can style it according to your requirements.
I want to be able to create multiple graphs on the same page where the data to each graph comes from separate CSV files.
Is it possible to display buttons on the webpage, for each chart to appear, with the on click option ?
This reply was modified 8 years, 7 months ago by ASK123.
You can render chart on clicking a button using onclick mouse-event. Please take a look at this JSFiddle for an example on rendering chart on button click with data from multiple CSV.
Thank you, Vishwas. How do I load data from multiple csv’s to plot the graph ? I want to send the csv filename as a parameter to the “Processdata” function.
You can load data from multiple external CSV files using AJAX request. Please take a look at this documentation page for step-to-step tutorial on rendering chart with data from CSV file. Also refer to this JSFiddle for an example on rendering single chart with data from multiple CSV files.
Parsing your CSV data according to the format accepted by CanvasJS should work fine in your case. Please find the code-snippet related to parsing data from your CSV format. dataPoints.push({ x: parseInt(rowData[1]), y: parseInt(rowData[2]), name:rowData[0] });