I have a javascript range slider with minimum value 0 and maximum value 133K.
My initial problem is that this javascript range slider goes up by a step value of 1, meaning that it is relatively useless with this large of a range. My second problem is that at any given point between 0 and 133K each value can have a different density and therefore should rise or fall at a slower step value accordingly. So, if for instance between 0 and 10 there are 50% of the total number of values, I want the range slider to move much much slower than say another range where the values represent only 1% of the total.
I have a mysql database of 8602 values that are represented in this range slider. Using the following formula I am able to get a breakdown of the number of values between many different ranges from 0 to 133K
Denominator = Max + abs(Min) N = Max / ( Denominator / 2 ) Query = SELECT FLOOR(( x + (N-1)) / N ) as size, value, count(x) as total
from table group by size
The method of getting the density distribution here isn't totally relevant. What is relevant is the data that I get back, and how to use it. Here's a sample table of some data points.
size total
1 312
2 339
3 245
4 265
What this table is telling me is that between 0 and 1 there are 312 out of 8602 values and so on. The majority of the values here lie between 0 to 100 and as you get closer to 100K almost all steps have only one value in these ranges. All I really want to do with this is generate an array of step values that take into account the density between values and sort of consolidates regions of extremely low density into one step point.
Hopefully this makes sense, I know I probably didn't explain it too well, so if anybody reads this and needs further clarification I would appreciate the help so let me know.