Marc Pou
Marc Pou

Reputation: 649

How to add a PieChart subplot in a JFree BarChart?

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?

enter image description here

Upvotes: 2

Views: 174

Answers (1)

trashgod
trashgod

Reputation: 205785

You can create a BufferedImage from any chart using createBufferedImage() and add it to a chart as an XYImageAnnotation.

Upvotes: 2

Related Questions