spring-mvcjfreechartpie-chartjfreereport

how to do partition of existing jfree pie Chart section on same chart


I am using Jfreechart to create a pie chart in Spring MVC. MY requirement is:

i have to create two section,FOUND and LOST on pie chart.also in,LOST section i need to create more sections representing Count of different LOST items. here

right now,i am able to create two sections on chart,FOUND and LOST. but i am not getting how to do partition of LOST section on same chart. How can i achieve this..please help


Solution

  • You may have started with org.jfree.chart.demo.PieChartDemo1, as the source is include in the distribution. Unfortunately, DefaultPieDataset does not support sub-categories suitable for partitioning.

    Here's an outline of one approach:

    image