how to fix the bar size no matter what ChartPanel size is

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
kyunam
Posts: 9
Joined: Wed Jan 28, 2004 3:10 am

how to fix the bar size no matter what ChartPanel size is

Post by kyunam » Fri May 21, 2004 6:00 am

For instance, StackedBarChartDemo2 has 4 Categories (4 bars).
If I change the dataset to have only one category (bar), it takes up a whole drawing area.

How do I fix a bar size no matter how big the drawing area is?

Thanks.
Q [/url]

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 » Fri May 21, 2004 11:58 am

You can't fix the bar width, but you can limit it using this method:

http://www.jfree.org/jfreechart/javadoc ... th(double)
David Gilbert
JFreeChart Project Leader

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

Locked