Home Forums Chart Support Load two sets of datapoints from two CSV files

Load two sets of datapoints from two CSV files

Viewing 3 posts - 1 through 3 (of 3 total)
  • #8403

    I need to plot two sets of datapoints to a line graph. Each set of datapoints need to be pulled from a CSV file. Both CSV files have 4 columns and the x axis will be pulled from column 2 (or 1 if you start at 0) and the y axis should be pulled from column 3. Can someone explain how I can accomplish this?

    #8407

    [Update]

    Now we have a Tutorial on Creating Charts from CSV Data in our documentation.

    You can split each line using some known separator and push resulting values into appropriate arrays. Here is an example which Anjali has given in another thread. Hope this helps.

    https://canvasjs.com/forums/topic/graph-a-csv-file/

    You can also use CSV parsing libraries to simplify the same.


    Sunil Urs

    #8408

    Thank you I was able to get this working and it looks great.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.