Generating embedded hyperlinks
Generating embedded hyperlinks
I've got a pie chart (generated by JFreeChart) in which each slice is hyperlinked to a different URL. I'd like to render the chart in SVG format, using <a> tags in the SVG output to implement the hyperlinks for each slice. Is there a way to do that using JFreeSVG? As far as I can tell, JFreeSVG won't ever generate the <a> tags itself; it seems like maybe the best I can do is get it to add identifiers to the groups for the slices so that I can figure out where to inject the <a> tags after the fact, but I can't even seem to get that working. I've tried to do that by calling setElementHinting(true) on the chart before calling draw, and that adds jfreesvg:ref="JFREECHART_TOP_LEVEL" to the outermost group -- but nothing else.