0

I added a feature to allow users to toggle item labels on charts. This is implemented by saving a pointer to the XYItemRenderer and calling the renderer's setBaseItemLabelsVisible method to show/hide item labels. However, it would be nicer if I could get a pointer to the XYItemRenderer from the chart instance, but give the cart I only seem to get as far as the plot. Does anyone know how to get a pointer to the renderer given the chart?

Toaster
  • 1,911
  • 2
  • 23
  • 43
  • See [How can I update a JFreeChart's appearance after it's been made visible?](http://stackoverflow.com/questions/5522575/how-can-i-update-a-jfreecharts-appearance-after-its-been-made-visible) – trashgod Nov 25 '11 at 13:28

1 Answers1

1

You will need to cast the plot to say CategoryPlot, XYPlot etc. to get the renderers.

Ashwinee K Jha
  • 9,187
  • 2
  • 25
  • 19