Preferred size of the chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Post Reply
Andrew Porebski

Preferred size of the chart

Post by Andrew Porebski » Mon Sep 11, 2000 4:42 pm

Hi,

First let me congratulate the author on an excellent job - chart are
beautifull.

While using the package I have come across a sizing problem.
In regular JAVA components, there are method to get their
preferred,minimum and maximum sizes. I would like to create a chart that is large enough to paint all of the values in the series properly.
example:

I have 20 values in the series and would like to create an BufferedImage that when painted on by the bar chart will contain unobscurred drawing of all values and the legend.

Given that I know how many values I need to draw I would like to
query the instantiated chart object for the 'preferred size' so that I can created the appropriately sized image.

Is it possible ?

Thanks

Andrew

David Gilbert

RE: Preferred size of the chart

Post by David Gilbert » Wed Sep 13, 2000 11:12 pm

Hi,

That would be a useful addition to JFreeChartPanel. I'll have to think about how to determine the preferred size - most of the code in JFreeChart is aimed at trying to make the charts look good at a range of sizes, so picking one size as the preferred size will be somewhat arbitrary. Even so, I can see the benefit.

Any suggestions from others are welcome...

Regards,

DG.

Post Reply