Different BarChart that the demo does not contains

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Fry
Posts: 14
Joined: Mon Aug 08, 2005 9:56 pm
Location: Karlsruhe (Germany)

Different BarChart that the demo does not contains

Post by Fry » Mon Oct 03, 2005 1:02 pm

hello forum! :D

Im looking for a little bit different Barchart. Well through the search i have found one topic which is familar to mine. This one:
http://www.jfree.org/phpBB2/viewtopic.p ... rchart+top

Well, now i know that the Typ is called StackedBarChart. I tryed to run the code but there is something wrong with junit. However, can anybody give me a little example how i have to set up the categoryset? I think the method createStackedBarChart in the Class ChartFactory is the right one.
I think i need an array to fill up the categoryDataset, didn't i?

One more question: In the developer guide, are there also demos which are not included in the demoapplication? So e.g. StackedBarChart?

Thx 4 help
Fry

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 Oct 03, 2005 4:58 pm

Fry wrote:Well, now i know that the Typ is called StackedBarChart. I tryed to run the code but there is something wrong with junit. However, can anybody give me a little example how i have to set up the categoryset? I think the method createStackedBarChart in the Class ChartFactory is the right one.
I think i need an array to fill up the categoryDataset, didn't i?
The CategoryDataset in a stacked bar chart is no different to the dataset for a regular bar chart - only the presentation is different. So, for example, you could run the BarChartDemo1 included in the org.jfree.chart.demo.* package, and change it to a stacked bar chart by changing the 'ChartFactory.createBarChart()' call to 'ChartFactory.createStackedBarChart()'.
Fry wrote:One more question: In the developer guide, are there also demos which are not included in the demoapplication? So e.g. StackedBarChart?
Yes, for some reason the stacked bar chart demos are not enabled in the current release, but they are included in the demo download as separate applications. In the next release, they will be incorporated in the SuperDemo app.
David Gilbert
JFreeChart Project Leader

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

Guest

Post by Guest » Tue Oct 04, 2005 10:08 am

Hi David,

thank you, i understand it and it works :-)

Fry

Locked