You must be logged in to post your query.
Home › Forums › Chart Support › how to create Multiple Charts on page
how can i create multiple chart (two chart) in one page?
@juliusk,
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.
Hi there, is it possible to display charts adjacent to each other like a widget type of thing, say two charts above and two below.
Hi
Can you please give us some link / screenshot that depicts the kinda widget that you want to create?
i don’t know if it’s a widget or what but here is the link. click on charts in this page: http://dev.sencha.com/deploy/ext-4.0.1/examples/sandbox/sandbox.html i want to display charts in one page like shown here but of course on a full page.
Hi,
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 ?
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.
— Vishwas R Team CanvasJS
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.
@ask123,
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.
I tried it, it’s not working. Please can you help me with why i’m unable to plot my graphs. Thanks!
Kindly check the example from the fiddle. Here is the screenshot of the working fiddle.
Hi, my csv data files are in this format : Name, x, y abc, 1, 4 def, 2, 1 ghi, 3, 2 Please help me with implement.
File_Link
This is my code.
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] });
dataPoints.push({ x: parseInt(rowData[1]), y: parseInt(rowData[2]), name:rowData[0] });
— Sanjoy
You must be logged in to reply to this topic. Login/Register