voidlabs / elycharts

Interactive Javascript (SVG|VML) Charting Library
http://elycharts.com
Other
10 stars 6 forks source link

Computation of Y axis max value is weird with multiple series #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With this:
-----
values : {
    a : [0.4,0.5,0.7,0.2],
    b : [0.7,0.95,0.2,0.4],
    c : [0,0.9,0,0]
},
----
the max Y is 0.96

With this:

-----
values : {
    a : [0.4,0.5,0.7,0.2],
    b : [0.7,0.95,0.2,0.4],
    c : [0,0,0,0]
},
----
(only the last serie has been changed to have all zeroes)
the max Y is now 1.20000000000002

With this:

-----
values : {
    a : [0.4,0.5,0.7,0.2],
    b : [0.7,0.9,0.2,0.4],
    c : [0,0.9,0,0]
},
----
The bigger value of the b serie (0.95) reduced to 0.9, 
the max Y is now 1.799999999999998

Original issue reported on code.google.com by stefano....@gmail.com on 9 Sep 2010 at 12:58

GoogleCodeExporter commented 9 years ago
1) 0.96 is ok (with normalization)
2) fixed (problem with series with min = max)
3) fixed (number rounding problem)

Original comment by eric.g...@gmail.com on 17 Sep 2010 at 3:57