I'm using jfreechart and jfreesvg for conversion
Are there any examples of how to make followed functionality work:
- tooltips;
- custom js function - ability to add a name to the bar in java code and then get it rendered in the html as javascript function (of course the implementation I'll provide separately);
Thanks, Eugene
Adding links, js function to jfreesvg
Re: Adding links, js function to jfreesvg
If possible can you please provide examples how to add unique id to Graphic2D objects in java using SVGHints.KEY_ELEMENT_ID in order to render them into svg object ids
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Adding links, js function to jfreesvg
Hi Eugene,
There have been some changes made to JFreeChart to make use of the element hinting feature in JFreeSVG, but these have not been released yet so you would have to look directly in SVN, for example:
http://sourceforge.net/p/jfreechart/code/3293/
Each renderer class needs to be modified to add an element key as it renders each data item. Some renderers have been updated already, others remain to do. I'm not sure when JFreeChart 1.0.20 will be released, I would like it to have been done already but I have many competing priorities.
Once the SVG is written with item keys defined for each data element, you can then overlay some JavaScript tooltip mechanism. I provide one example in the following post about Orson Charts (which is a 3D chart library I wrote that is quite similar to JFreeChart) with JFreeSVG:
http://www.object-refinery.com/blog/blog-20140509.html
You should read that post to get an idea of the mechanism, it will be pretty much the same approach with JFreeChart. I hope that helps a little.
There have been some changes made to JFreeChart to make use of the element hinting feature in JFreeSVG, but these have not been released yet so you would have to look directly in SVN, for example:
http://sourceforge.net/p/jfreechart/code/3293/
Each renderer class needs to be modified to add an element key as it renders each data item. Some renderers have been updated already, others remain to do. I'm not sure when JFreeChart 1.0.20 will be released, I would like it to have been done already but I have many competing priorities.
Once the SVG is written with item keys defined for each data element, you can then overlay some JavaScript tooltip mechanism. I provide one example in the following post about Orson Charts (which is a 3D chart library I wrote that is quite similar to JFreeChart) with JFreeSVG:
http://www.object-refinery.com/blog/blog-20140509.html
You should read that post to get an idea of the mechanism, it will be pretty much the same approach with JFreeChart. I hope that helps a little.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Re: Adding links, js function to jfreesvg
Hi, David
Thanks for reply. I'll keep on researching in this direction ...
Thanks for reply. I'll keep on researching in this direction ...