create gaps in axis

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Ghurdyl
Posts: 6
Joined: Fri Apr 09, 2010 1:49 pm
antibot: No, of course not.

create gaps in axis

Post by Ghurdyl » Fri Apr 16, 2010 2:45 pm

Hello,

Hard to find a short but explicit title for this topic.

I am rendering horizontal bar chart showing tasks schedule.
for each task I have a
- customer available time
- scheduled time
- actual completion time
- due date

Depending on the tasks, showing those four data can lead to almost empty graph, here are examples :
Good looking :
Image

Bad, because there is a wide area with no data :
Image

Bad because there is a wide area with only the same data (green):
Image

What I would like to have is to adapt scale locally so that data are more visible, like this (paint edited) :
Image

As you can see, there are gaps in the range axis (PlotOrientation.HORIZONTAL).

So I would like to have hints / suggestions about the way I could to this. I was thinking about putting several graphs together but I I am not sure it is the easiest/best way to handle it.

Thanks for any input.

gengar
Posts: 26
Joined: Thu Mar 18, 2010 12:28 am
antibot: No, of course not.

Re: create gaps in axis

Post by gengar » Fri Apr 16, 2010 11:56 pm

If your domain axis is a DateAxis, then I think you could try setting a "TimeLine" for the axis.

http://www.jfree.org/jfreechart/api/jav ... eAxis.html
http://www.jfree.org/jfreechart/api/jav ... eline.html

Ghurdyl
Posts: 6
Joined: Fri Apr 09, 2010 1:49 pm
antibot: No, of course not.

Re: create gaps in axis

Post by Ghurdyl » Mon Apr 19, 2010 8:11 am

I have just read the javadoc for Timelines,

seems this can do what I want.

thanks for the hint :D

Locked