Home › forums › Using CanvasJS › How to fetch x and y values from canvas chart
Tagged: jquery, js, x and y values
This topic contains 1 reply, has 2 voices, and was last updated by Sanjoy 1 year ago.
I have plotted a canvas chart from a csv file.
Now I would like to fetch the data (x and y values) and print the values in a label when I hover on .
I initially tried to pass the data from the API objet named ‘datapoints’ but the printed value of it was ‘[object Object]’
I know that there is already a label which does that,(which presents a value when we hover on it) but I want to present that data in a custom label.
Is it possible ? If yes, please guide me in how to proceed.
Are you looking for mouseover event, where you can get the currently hover dataPoint’s x and y values like e.dataPoint.x and e.dataPoint.y. Or else you can look into toolTip contentFormatter.
If this doesn’t suite your requirements, could you please provide us a pictorial representation to understand better.
You must be logged in to reply to this topic.
ASP.NET MVC Charts
ContactSales EnquiriesSupport ForumTwitter Support Handle