Misc: blank charts, histograms, refreshment

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

Misc: blank charts, histograms, refreshment

Post by Pavel Grinfeld » Fri Jun 22, 2001 7:36 pm

Hi,

I'm very new to JFreeChart and there a few things that I can't seem to figure out. (Regardless, I'm already using JFreeChart successfully and am very happy with it! Keep up the good work!)

1. Is it possible to start with simply a blank chart? I've sort of accomplished that by creating a dummy DataSource but it seems very inelegant.

2. I want to plot a histogram. It's a bar chart however it's "category" axis needs to have regular labels similar to the XYPlot. Can you help suggest how to accomplish that?

3. The plots seem to go through the rendering step every time they are uncovered. If I'm plotting 1000 lines on a graph it is perfectly reasonable to have to wait once but I find myself waiting every time I uncover the graph. (My graph is contained within a tab of a tabbed pane.)

Many thanks in advance

David Gilbert

RE: Misc: blank charts, histograms, refreshment

Post by David Gilbert » Sat Jun 23, 2001 6:00 pm

Hi Pavel,

Thanks for your post, you ask good questions! Unfortunately JFreeChart doesn't support the features you mention:

(1) I need to amend all the Plot subclasses so they work with a null datasource;

(2) I am planning on writing a XYBarPlot class, that should cover your histogram requirement - can't seem to find any free time at the moment though;

(3) One idea would be to modify JFreeChartPanel so that it displays an image, and the get JFreeChart to update the image only when the panel changes size, or the chart itself changes.

I'll have a go at these changes some time, but if you do the mods yourself, I'd be glad to receive your code to add to the main source tree...

Regards,

DG

David Gilbert

RE: Misc: blank charts, histograms, refreshment

Post by David Gilbert » Thu Jun 28, 2001 9:30 pm

Another developer, Søren Caspersen, has contributed some code that implements the buffering that I described in (3) above. I've committed the code in CVS on SourceForge if you want to use it straight away, the SourceForge project page is at:

http://sourceforge.net/projects/jfreechart

Regards,

DG.

Locked