How to get a data point value from the chart series in JavaScript Chart?
You can get the information related to a point in series when moving mouse over the point or by clicking the point using pointRegionMouseMove or pointRegionClick event in JavaScript Chart.
Point region mouse move
pointRegionMouseMove event is triggered when you move mouse over a point.
Point region click
pointRegionClick event is triggered when you click a point
JS
$(function () { $("#container").ejChart({ //Event for chart mouse move pointRegionMouseMove: "mousemove", //Event for mouse click pointRegionClick: "mousemove", }); }); //Event handler for mouse move and mouse click function mousemove(sender) { series = sender.model.series[sender.data.region.SeriesIndex]; var X = series.points[sender.data.region.Region.PointIndex].x; var Y = series.points[sender.data.region.Region.PointIndex].y; alert("X:" + X + " Y:" + Y); }
JS Playground Link: Point Data
Conclusion
I hope you enjoyed learning about how to get a data point value from the chart series in JavaScript Chart.
You can refer to our JavaScript Chart feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our JavaScript Chart example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!