1. Can u create a new legend ?? coz the legend class does not provide any methods for adding new items.
2. how can u create a stacked bar chart using xml?
Legend,bar chart using xml
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Legend,bar chart using xml
You can write your own legend class...or subclass the plot and override the getLegendItems(...) method.j wrote:1. Can u create a new legend ?? coz the legend class does not provide any methods for adding new items.
Not exactly sure what you mean by that...but you can use the DatasetReader class to read a CategoryDataset from an XML file, then create a stacked bar chart from that.j wrote:2. how can u create a stacked bar chart using xml?
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


bar chart using xml
ya i know how a bar chart is craetd. have seen the demos. but incase of a stacked bar chart teh data is in the from of a 2-d array. in that case how do i mention it in xml file??
thanks and regards
j
thanks and regards
j
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
I still don't understand...both the regular and stacked bar charts are created using a CategoryDataset. And you can use the DatasetReader class to read a CategoryDataset from an XML file. Whether you use that dataset for a bar chart or a stacked bar chart doesn't matter.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


barchart using xml
thank you. i got the solution. similar to what u said.