Hello,
I'm trying to represent category data inside other categories. For example, I have category CAT1 which will group subcategories SCAT1, SCAT2 etc and each subcategory will have two values represented by two bars.
One option which I'm trying to make it work is to use a different CategoryPlot for each category CAT1, CAT2 etc. and plot each subcategory in its corresponding plot. Unfortunately, when there are many categories the subplots are shrunk. I have posted about this problem here: viewtopic.php?f=3&t=117511.
I was wondering if there is another way to represent the kind of chart I described. Any ideas?
Thanks
Representing categories inside other categories
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Representing categories inside other categories
The SubCategoryAxis class can be used for this. There is an example in the JFreeChart demo collection that comes with the JFreeChart Developer Guide. There's also some info in this older post:
http://www.jfree.org/phpBB2/viewtopic.php?f=3&t=109536
http://www.jfree.org/phpBB2/viewtopic.php?f=3&t=109536
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
Re: Representing categories inside other categories
Thank you David! I'll give it a try.
Re: Representing categories inside other categories
Hello,
I tried the SubCategoryAxis but it seems that this class is used to assign labels to subcategories. I wasn't able to create e.g. 2 bars for each subcategory since the DefaultCategorySet assigns the values to categories. Is it possible to assign values to subcategories directly?
I tried the SubCategoryAxis but it seems that this class is used to assign labels to subcategories. I wasn't able to create e.g. 2 bars for each subcategory since the DefaultCategorySet assigns the values to categories. Is it possible to assign values to subcategories directly?