Generating embedded hyperlinks
Generating embedded hyperlinks
I'm using JFreeSVG to render pie charts generated with JFreeChart. I'm using CustomPieURLGenerator to associate a custom URL with each pie slice, and I'd like the SVG output to include <a> tags linking to those custom URLs. Is there any way to do that directly with JFreeSVG? From a handful of posts I've found in this forum, I'm inclined to think the answer is no, and that the best I can do is to get JFreeSVG to attach some IDs to the slice elements so that I can do some post-processing to attach the URLs after the fact. That appears to be what JFreeChart.setElementHinting is for, but when I set that to true, all that happens is that JFreeSVG adds jfreesvg:ref="JFREECHART_TOP_LEVEL" to the outermost group in the generated SVG output; nothing is added to the groups that represent the pie slices. Can anybody provide an example of how to properly use element hinting, or (even better) an example of how to render JFreeChart slice URLs as embedded links in the SVG?