Home › forums › Using CanvasJS › line graph with multiple series from csv Tagged: dataPoints, line graph, Multip
I would like to know how it is possible to get a line chart
from separate CSV (somename.csv) file and how to get it as a dynamic chart ?
Please take a look at this documentation to render chart from CSV. Also, check this documentation on rendering dynamic chart. You can combine the given examples to achieve your requirement.
if I use the code from yours document “Creating Charts from CSV” I can
download a file from “https://canvasjs.com/services/data/datapoints.php?xstart=5&ystart=10&length=10&type=csv”
(https in yours code) and I get the file named “dataPoints.csv”. My question
is : how can I use the file dataPoints.csv directly in this code but without
$.get(“https://canvasjs.com/services/data/datapoints.php?xstart=5&ystart=10&length=10&type=csv” … ?
CanvasJS render the charts based on the dataPoints passed to it. To read a CSV file/CSV Data you will have to use an AJAX request and convert the same to CanvasJS supported format. Please refer to this StackOverflow link for more information on AJAX calls.
You must be logged in to reply to this topic.