On page jqPlot there is an example of dragging data point on jqPlot chart.
How can I submit (e.g. with jQuery ajax) to server changed values? Are changed (current) values stored somewhere in jqplot object?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The hardest thing here is knowing when the user drags a point, not getting the data afterward. I recommend you use a postDrawSeries hook like so:
Output on every drag is (containing the updated data point):
Here’s an example. (You’ll have to cache the jqPlot js files in your browser since they do not allow hotlinking.)
You’ll have to implement some sort of timer to wait for 5 seconds or so before calling your ajax since the postdrawseries hook fires on EVERY drag event. That shouldn’t be too hard though.