Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 29 by
b.engelb...@gmail.com: axis.min does affect line graphs of
positive numbers
http://code.google.com/p/elycharts/issues/detail?id=29
What steps will reproduce the problem?
1. Configure axis.l.min as 300
2. Plot a line graph of these values (all > 300):
[410, 406, 482, 613, 337, 530, 483, 518, 469, 393, 463, 570, 323]
What is the expected output?
Vertical axis starts at 300
What do you see instead?
Vertical axis starts at 0
What version of the product are you using? v2.1.4-SNAPSHOT
On what operating system? Windows 7, Google Chrome
Please provide any additional information below.
There are two coding issues that together cause this:
1: lines 3137 - 3138:
for (i = 0; i < showValues.length; i++)
plot.from.push(0);
This causes minimum value > 0 to be ignored.
To fix, second line could be replaced by:
plot.from.push(
plot.to[i]);
2. Lines 3219 - 3220:
if (axis[lidx].min)
axis[lidx].min = Math.floor(axis[lidx].min / v) * v;
At this point, v is always > axis[lidx].min, thus Math.floor(axis[lidx].min
/ v) is always equal to 0. It appears that it was intended to round to a
multiple of basev (10 in the example), i.e., the second line could be fixed
as:
axis[lidx].min = Math.floor(axis[lidx].min / basev) * basev;
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings