Search code examples
javachartsjfreechart

How to rotate pie chart with mouse wheel in JFreeChart?


I'm searching about a pie chart that is rotated by mouse wheel but couldn't find a good example.


Solution

  • You can use the ChartPanel method setMouseWheelEnabled(true).

    Addendum: PieChartDemo1, included in the distribution, is a complete example; click the class name to see the source.