Home Forums Chart Support Render multiple CSV in same chart

Render multiple CSV in same chart

Viewing 4 posts - 1 through 4 (of 4 total)
  • #29140

    Hi, I have 3 CSV’s which I would like to render in same chart. I used the logic provided for dynamic length of datapoints in the forum and enhanced it for 3 CSV. But I see that chart is plotting x-axis 3 times.
    CSV is like :
    CSV1
    Time[usec],s1_server32,s1_server34,s1_server40,s1_server41,s1_server42,s1_server43,s1_server44,s1_server45,s1_server47,s1_server48
    15,8.48,8.53,8.68,8.5,8.6,8.65,8.75,8.48,8.61,8.55
    30,8.43,8.44,8.45,8.44,8.44,8.45,8.41,8.46,8.47,8.46
    45,8.44,8.44,8.45,8.44,8.44,8.45,8.41,8.45,8.47,8.45
    60,8.43,8.43,8.45,8.44,8.43,8.45,8.41,8.46,8.47,8.45

    CSV2
    Time[usec],s2_server32,s2_server34,s2_server40,s2_server41,s2_server42,s2_server43,s2_server44,s2_server45,s2_server47,s2_server48
    15,8.48,8.53,8.68,8.5,8.6,8.65,8.75,8.48,8.61,8.55
    30,8.43,8.44,8.45,8.44,8.44,8.45,8.41,8.46,8.47,8.46
    45,8.44,8.44,8.45,8.44,8.44,8.45,8.41,8.45,8.47,8.45
    60,8.43,8.43,8.45,8.44,8.43,8.45,8.41,8.46,8.47,8.45

    CSV3
    Time[usec],server32,server34,server40,server41,server42,server43,server44,server45,server47,server48
    15,17.13,17.18,17.46,17.13,17.31,17.36,17.73,17.15,17.21,17.19
    30,17.08,17.09,17.08,17.09,17.08,17.08,17.08,17.09,17.08,17.08
    45,17.09,17.09,17.08,17.08,17.09,17.08,17.08,17.08,17.08,17.08
    60,17.08,17.08,17.09,17.09,17.09,17.09,17.09,17.09,17.08,17.08

    Jfiddle link :
    https://jsfiddle.net/ad1srkhx/

    #29152

    @manuks,

    Please take a look at this updated JSFiddle.

    —–
    Manoj Mohan
    Team CanvasJS

    #29167

    Hi Manoj, the result works partially. When there is lesser columns in the CSV I don’t see the lines getting plotted. I see that sometimes it will plot and sometimes its blank. Screenshot for the case :

    https://pasteboard.co/J6Xmfgi.png

    CSV1
    Time[usec],s1_server40,s1_server44
    15,20.97,32.92
    30,21,21.27
    45,22.02,21.33
    60,20.98,21.58
    75,20.97,21.45
    90,21.93,21.29
    105,22.02,21.34

    CSV2
    Time[usec],s2_server40,s2_server44
    15,20.97,20.97
    30,22.02,22.02
    45,20.97,20.97
    60,20.97,20.97
    75,22.02,22.02
    90,20.97,22.02
    105,20.97,20.97

    CSV3
    Time[usec],server40,server44
    15,41.94,53.89
    30,43.02,43.29
    45,42.99,42.3
    60,41.95,42.55
    75,42.99,43.47
    90,42.9,43.31
    105,42.99,42.31
    120,42.95,42.5

    How to debug this?

    #29197

    @manuks,

    It seems like you are setting axisY maximum to 20. Removing maximum should work fine in your case.

    —-
    Manoj Mohan
    Team CanvasJS

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

You must be logged in to reply to this topic.