Can jFreeChart support this Chart Type?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Jason Spady

Can jFreeChart support this Chart Type?

Post by Jason Spady » Wed Jan 14, 2004 5:29 pm

http://www.geo.fmi.fi/image/pics/data2002.gif

If so, would anyone be able to push me in the right direction? I first thought of a horizontal bar chart but do not know a way to stop and start the bar for the same site.

Example Site #1 _______________ ______________ ________ ___ _

Even ideas on how I could generate this if jFreeChart is unable to accomplish the task would be helpful.

Thanks.

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

Post by david.gilbert » Wed Jan 14, 2004 9:50 pm

You could get close to what you want by looking at the GanttChartDemo2.java application (included in the distribution, in the src/org/jfree/chart/demo directory).

But to be honest, the cleanest approach would be to define a new plot type that uses some of the existing JFreeChart components (CategoryAxis and DateAxis for starters) and a new dataset interface. It is more work, but the end result would be better.
David Gilbert
JFreeChart Project Leader

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

Jason

Guide

Post by Jason » Sun Jan 18, 2004 9:24 pm

Ok.

I have looked at the api and ran a few test charts. I am hesitant to purchase the guide after reviewing its table of contents. Is there anything in the guide that would demonstrate how to do any of this customization? It appears that I would extend the AbstractCategoryItemRenderer and as you mentionmed a new dataset interface although am I correct in assuming the guide will not review any of this?

Thanks in advance.

Jason

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

Post by david.gilbert » Mon Jan 19, 2004 9:39 am

I think I would opt for a completely new renderer, plot and dataset. That way you can get away from the requirement imposed by the CategoryDataset that the data fits into a table structure (a fixed number of rows and columns). That is the limitation that gets in the way of the existing Gantt chart implementation, and I think your chart shares some features in common with Gantt charts (although Gantt charts add some additional very specialised requirements).

The JFreeChart Developer Guide focuses more on explaining the existing features of JFreeChart than how to extend it, so you probably won't find it directly useful for this work.
David Gilbert
JFreeChart Project Leader

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

balex
Posts: 2
Joined: Wed Dec 01, 2004 4:50 pm

Chart to represent outlook style appointments

Post by balex » Thu Dec 02, 2004 12:09 pm

Hi,

This looks very similar to the problem posed here http://www.jfree.org/phpBB2/viewtopic.p ... ask+extend

Has anyone had any luck solving this, I am currently using the Gantt charts subTasks to display something similar but I would prefer something a bit cleaner.

Cheers,

Alex

Locked