Home forums Using CanvasJS Z-index for canvas chart

This topic contains 3 replies, has 2 voices, and was last updated by  Priyanka M S 3 months ago.

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

    adjmpw
    Participant

    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

    Priyanka M S
    Member

    @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

    adjmpw
    Participant

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

    #22671

    Priyanka M S
    Member

    @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.