Home Forums StockChart Support stripLines in stockCharts acting weird

stripLines in stockCharts acting weird

Viewing 2 posts - 1 through 2 (of 2 total)
  • #32218

    Is it possible to set() striplines from a stockchart as you can can a standard chart? I’m looking to pull the trigger on purchase but i’m struggling. I’ve managed to update stripline base on websocket information that’s coming across, but unless the graph data is static, it disappears. Because there is no striplines set() on stockcharts, I simply set stripLines[0] to what I want it to be and render. If the chart data is static, it works a treat. If it’s async data, the chart data disappears every time the stripLine is updated and I render. Below I have an example fiddle of the static chart data but with a moving stripLine that works. The next fiddle is what i’m trying to accomplish with async data vs status.

    Working with Static data
    https://jsfiddle.net/HawtDogFlvrWtr/17s2dmx3/32/

    Not working with async data
    https://jsfiddle.net/HawtDogFlvrWtr/17s2dmx3/43/

    #32237

    @hawtdogflvrwtr,

    AJAX request is asynchronous – the operation occurs in parallel and the order of completion is not guaranteed. In your case, calling stockChart.render() soon after updating datapoints within AJAX request should work fine. Please take a look at this updated JSFiddle.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.