How to disappear gap in y axis

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
mrburns2002
Posts: 6
Joined: Tue Feb 10, 2009 12:50 pm

How to disappear gap in y axis

Post by mrburns2002 » Tue Mar 03, 2009 9:51 am

Hi there,

I have a problem:
Assume, I have two time lines in my chart - the one is a line with values between 90-100 (y axis) and the second one has values between 1-10 (y axis). Now, I receive a chart with a very big gap between the two lines (11-89 y-axis). How can I make the chart that the chart automatically disappears this gap by writing something like "..." instead of the gap?

Do you know what I mean?

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: How to disappear gap in y axis

Post by david.gilbert » Tue Mar 03, 2009 11:02 am

There's nothing in JFreeChart to do this. You'd need to implement a custom axis to skip some values (and provide some mechanism for specifying which values are skipped). You might also need to customise the renderer to highlight the skipped values.

I'm not sure how I'd implement this in a generalised way, but for a specific requirement it shouldn't be that hard to implement.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Franciszek
Posts: 1
Joined: Wed Mar 11, 2009 3:37 pm

Re: How to disappear gap in y axis

Post by Franciszek » Wed Mar 11, 2009 4:48 pm

Hi mrburns2002,
mrburns2002 wrote: Assume, I have two time lines in my chart - the one is a line with values between 90-100 (y axis) and the second one has values between 1-10 (y axis). Now, I receive a chart with a very big gap between the two lines (11-89 y-axis). How can I make the chart that the chart automatically disappears this gap by writing something like "..." instead of the gap?
I have the same problem You wrote about. I need to place on one chart price changes of multiple CURRENCIES (and between part of them I have big gaps). Were You able to solve this problem and can share some information about possible solution?

Thanks in advance for help.

//Franciszek

Locked