Home Forums Chart Support Z-index for canvas chart

Z-index for canvas chart

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

    I have a chart with 2 y axis ,in first y axis line is drawn , in 2nd y axis bar chart is drawn ? Bar chart is overlapping the line chart , how to set something line Z-index in chart ?

    Note : I use websocket for line chart so its instant and I use ajax post request to draw bar chart , so I cannot draw bar chart first.

    #22663

    @adjmpw,

    Making column chart(the bar chart which you have mentioned) as the first data series and line chart as the second data series should work fine in your case. Please take a look at this gallery example on combination charts.

    __
    Priyanka M S
    Team CanvasJS

    #22666

    as I told , price is drawn first and column is drawn second due to ajax and websocket speed…

    #22671

    @adjmpw,

    Irrespective of when you receive the data for charts, defining line chart as the second dataSeries and updating dataPoints of the respective dataSeries on receiving data from web-socket or AJAX should work fine in your case. Please take a look at this JSFiddle where dataPoints for 1st dataSeries, which is of type column, is updated after clicking the button.

    __
    Priyanka M S
    Team CanvasJS

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

You must be logged in to reply to this topic.