I have a requirement to Plot a graph with zoom feature using x axis selection, i am using Flot for plotting graph. I have to show the number of points present after zooming.
I am alwayz getting the total length not the Zoomed length.
Kindly Help
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.
In your “plotzoom” callback, you can get min & max x / y co-ordinates back like so (from the examples on the site):
You can the use these to count how many points are within this rectangle.
May i suggest using underscore.js filter function to simplify this?
Eg.
This will give an array with points in-between x & y maxims. You can then use length to get the count!