Home Forums Chart Support Click anywhere on a chart

Click anywhere on a chart

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

    Is it possible to handle clicks on the plot area overall? I only found clicks on data points in the chart documentation.

    I have a chart with the dates on OX, and I want for the user to be able to “select” a date on click. This should be any date, not necessarily the data point

    #30613

    @archeg,

    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 as shown in this documentation page.

    If this doesn’t fulfill your requirements, kindly create a JSFiddle with your use-case and share it with us so that we can look into the chart options being used, understand the scenario better and help you resolve.


    Shashi Ranjan
    Team CanvasJS

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

You must be logged in to reply to this topic.