Home Forums Chart Support Display tooltip without source point

Display tooltip without source point

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

    Hi, I have a simple spline chart ( 100 points )

    I would like to be able to click on the chart between 2 points to display its coordinates.

    https://canvasjs.com/docs/charts/chart-options/data/click/ only allows you to click on a datapoint itself.

    Is there any way to click on the chart between 2 datapoints ?

    thanks

    #31841

    @creteurlouis,

    You can bind mouse events to the chart-container(div) and get mouse coordinates in pixels, which you can convert to corresponding value along axis using convertPixelToValue. Please take a look at this JSFiddle for an example.


    Shashi Ranjan
    Team CanvasJS

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

You must be logged in to reply to this topic.