Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line Graph - Shrinking of the values being plotted #104

Open
SharanA opened this issue Apr 28, 2011 · 0 comments
Open

Line Graph - Shrinking of the values being plotted #104

SharanA opened this issue Apr 28, 2011 · 0 comments

Comments

@SharanA
Copy link

SharanA commented Apr 28, 2011

Hi,

In the Raphael Line Graph, if the number of values plotted is greater than the width of the graph minus 2 times gutter size, a shrink algorithm kicks in, which CHANGES/shrinks the values the user sends in to be plotted, with the result that on the graph I am not really seeing the values that I plotted (they have been shrunk).

I understand that some sort of shrinking needs to happen to squash the graph in the provided space, but I don't understand the thinking behind changing the actual business values provided to be plotted. The values do not even retain their scale in relation to the Y axis. For eg if I plot the following values on the x and y axis respectively, the value (3.0, 10000.0) is reflected as (3.4, 14000):
var lines = paper.g.linechart(50, 50, 29, 300,
[[0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]],
[[0.0, 79997.0, 80023.0, 10000.0, 20000.0, 30000.0, 40000.0, 80222.0, 80253.0, 80283.0]])

Is there another way around this? Could someone please help with this problem if you have come across it and found a solution?

The example above is just a simplified example. I came across the problem when trying to plot a per minute graph for a whole day - so 1440 values - it only "works" if the width is 1460 or more..otherwise all the values to be plotted are recalculated which results in an "incorrect" graph for my purposes

Thanks
Sharan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant