Home Forums StockChart Support StockChart Price Displays

StockChart Price Displays

Viewing 3 posts - 1 through 3 (of 3 total)
  • #59980

    Is it possible to show the OHLC values dynamically in the legend, rather than attached to the crosshairs as you hover over the chart?

    #59984

    Adam Evans,

    Updating legendText on hovering over the datapoint should work fine as per your requirements. Please find the code-snippet below.

    mouseover: onMouseover(e){	
        e.dataSeries.legendText = (e.dataSeries.dataPoints[e.dataPointIndex].x + ": " + e.dataSeries.dataPoints[e.dataPointIndex].y).toString();
        e.chart.render();
    }

    Please take a look at this JSFiddle for an example of the same.


    Vishwas R
    Team CanvasJS

    #60013

    Wonderful. Thanks for the quick response! Have a great day.

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

You must be logged in to reply to this topic.