Home › forums › Chart Support › Click anywhere on a chart
Tagged: click interaction
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
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.
You must be logged in to reply to this topic.