Home forums Using CanvasJS Combine CSV chart with one column with another chart that has two columns.

This topic contains 3 replies, has 2 voices, and was last updated by  Vishwas R 4 months, 1 week ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #22062

    recond9
    Member

    Hello.
    So I got this https://canvasjs.com/php-charts/chart-from-csv-data/ implemented on my work server, and it works fine, I am able to parse a CSV file.
    But the CSV file I have has two columns and this https://canvasjs.com/javascript-charts/multiple-axis-column-chart/ would be a perfect fit for my project.
    I would like to keep the style and the design of the Mutlple Axes chart but add the CSV Import functionality.
    How can I integrate this with the CSV file ?
    Thank you so much !

    • This topic was modified 4 months, 1 week ago by  recond9. Reason: modified the title
    #22064

    Vishwas R
    Keymaster

    @recond9,

    You can render multi-series chart from CSV data by parsing data and passing it to Chart in the format accepted by CanvasJS. Please take a look at this jsfiddle.

    Refer Creating Chart from CSV for tutorial / more info on rendering chart from a CSV file.


    Vishwas R
    Team CanvasJS

    #22077

    recond9
    Member

    @vishwas R
    Hello again.
    Thanks for the replay, the jsfile helped me achieve my goal. But I have noticed something wierd.
    The graph’s columns seems to compare data from all the data in the graph not from the linked column that share the same data set.
    The result of this is that the columns don’t have the actual size that you would exepct given the values that are attached to them from the CSV file.

    I have attached a link to an picture bellow for better understanding: http://tinypic.com/r/9fvgnt/9

    Hope you understand what my problem is, and you can help me again.

    Thank you so much !

    • This reply was modified 4 months, 1 week ago by  recond9.
    #22080

    Vishwas R
    Keymaster

    @recond9,

    You are observing this behaviour as the first dataSeries is attached to primary axisY and the second dataSeries is attached to secondary axisY. Both axis have different range hence the height of the column varies according to their respective axis range.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.