views:

563

answers:

1

Specifically I am looking to add text annotations to specific locations to a JFreeChart that is being output to a png file for web use. Can/how do annotations get added to pie charts. I have been able to successfully add annotations to XYPlots, but don't know how to overlay or add one to a PiePlot.

My full task is to use the PiePlot to create a sort of clock. So far everything has worked great, but now I need to add labels at the 12, 3, 6, and 9 o'clock locations and completely stumped.

Adam

A: 

After a fairly strenuous search I don't believe this is currently possible (JFreeChart 1.0.13). Possible options are:

Create a second chart with an XYPlot to generate a second image with needed annotations. Overlay this image on the page. This option is bad because it doubles the number of chart images to be uploaded.

Set the image as a background on the page and HTML the text over the image. Bad because it isn't maintainable and makes a headache of data transfer.

Personally I am just going to find another way to communicate the information in the title, but I wanted to post my findings for the next person. Adam

Adam