How to add a PieChart subplot in a JFree BarChart?
-
17-04-2021 - |
Question
I want to include a PieChart subplot over a JFree BarChart. The idea is represent how many items are included in the chart vs the total number of items to see how long is the Long Tail.
Here you can a sample image. How can I build something similar with JFreeChart?
Solution
You can create a BufferedImage
from any chart using createBufferedImage()
and add it to a chart as an XYImageAnnotation
.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow