Line Overlapping

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
ivo.hechmann
Posts: 3
Joined: Mon Sep 17, 2007 12:52 pm

Line Overlapping

Post by ivo.hechmann » Mon Sep 17, 2007 12:58 pm

Hello;

When i create a graph with two timeseries (blue and red) with exactly the same values i see only one line (which obviously overlapps the other). can i change the behaviour so that both lines are displayed (next to the other)?

Thank you very much...

ivo

TranceTip
Posts: 4
Joined: Thu Sep 13, 2007 4:28 pm

Post by TranceTip » Mon Sep 17, 2007 1:23 pm

What do you mean by "next to the other"? Do you mean that you want one line to be drawn not at exactly the correct value but slightly above or below the value?

You could also compare your data points and decide whether the series are too close to one another. In this case you could hide one of the series and displaying a message stating that they are the same.

ivo.hechmann
Posts: 3
Joined: Mon Sep 17, 2007 12:52 pm

Post by ivo.hechmann » Mon Sep 17, 2007 1:42 pm

Yes, 'next to the other' should mean that both lines are drawn close, so if the blue line and the red line both have the value '5' the blue line is drawn at '4.99' and the red line is drawn at '5.01' for example.

If i have four lines and two of them overlap the other two, i see in the legend that there are four lines but i dont know behind which the lines are hidden.

I think i can iterate over each timeseries of each dataset and check for overlapped values, i just thought maybee there is a option to set that prevent lines to be hidden....

Thank you...

ivo

s2tsefanie
Posts: 8
Joined: Mon May 26, 2008 9:46 pm

Post by s2tsefanie » Tue Aug 19, 2008 9:40 am

hi,
i think as a Solution (if you dont find one yet) is to draw the pionts of th lines with different bigness or dimensions. I mean the red one is smal, the blue one is middle, the yellow one is large, ...
But dont ask me how to do it :cry:

And if someone knows, please write the answer here so everyone can learn.
Thanks

Locked