AreaChart edge gaps

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Arkkimaagi
Posts: 25
Joined: Wed Jun 09, 2004 6:15 am
Location: Helsinki, Finland
Contact:

AreaChart edge gaps

Post by Arkkimaagi » Mon Jan 08, 2007 2:31 pm

I'm having problems with AreaCharts and their edges when null or no data is used.

Here's my sample situation
Image

The upper chart shows how it currently works, and the lower chart shows what I was aiming for. (Photoshop Mockup)

I'm using org.jfree.chart.renderer.xy.XYAreaRenderer2 as the renderer.

Here's the data I've used, I've tried with the null values (it's even more messier) and not entering the null values on current line. (later is used on sample image)

Code: Select all

Timestamp	blue	red	sin*0.5+0.5	0.5
08.01.2007 14:25	1	null	0,65	0,5
08.01.2007 14:26	1	null	0,79	0,5
08.01.2007 14:27	1	null	0,9	0,5
08.01.2007 14:28	1	null	0,98	0,5
08.01.2007 14:29	1	null	1	0,5
08.01.2007 14:30	1	null	0,98	0,5
08.01.2007 14:31	1	null	0,9	0,5
08.01.2007 14:32	1	null	0,79	0,5
08.01.2007 14:33	1	null	0,65	0,5
08.01.2007 14:34	1	null	0,5	0,5
08.01.2007 14:35	null	1	0,35	0,5
08.01.2007 14:36	null	1	0,21	0,5
08.01.2007 14:37	null	1	0,1	0,5
08.01.2007 14:38	null	1	0,02	0,5
08.01.2007 14:39	null	1	0	0,5
08.01.2007 14:40	null	1	0,02	0,5
08.01.2007 14:41	null	1	0,1	0,5
08.01.2007 14:42	null	1	0,21	0,5
08.01.2007 14:43	null	1	0,35	0,5
08.01.2007 14:44	null	1	0,5	0,5
08.01.2007 14:45	1	null	0,65	0,5
08.01.2007 14:46	1	null	0,79	0,5
08.01.2007 14:47	1	null	0,9	0,5
08.01.2007 14:48	1	null	0,98	0,5
08.01.2007 14:49	1	null	1	0,5
While searching for a solution, I found my old post (http://www.jfree.org/phpBB2/viewtopic.php?t=13520) , unanswered that's related somewhat to the problem, but the renderer was a different one.

The idea behind this chart is to show a timeline and colorize it according to a group. Think of separate work groups who work in about 6 hour shifts, this way one can show which shift was in turn at any given time, with possible other charts laid ontop of this.

Am I approaching this problem the wrong way, is there a better chart type than this to accomplish the same result, or is there a way to fix the gaps?
~ Arkkimaagi ~
Experto Credite

cme_st
Posts: 31
Joined: Thu Aug 31, 2006 9:02 am
Location: Lappeenranta, Finland

Post by cme_st » Wed Jan 10, 2007 12:03 pm

I would also be interested in having sharp edges between non-null and null values. Does anybody know how to do that?

Chris

Locked