Tooltips are very important, especially in charts like line charts, time-series charts etc. Showing tooltips in images embedded in html pages is achieved by making use of html "map". Fortunately, JFreeChart has built-in support for generating the map details for the images. This example basically takes the concepts mentioned in the article JFreeChart and wicket example and tweaks it a little to add the "map" information so that we can display tooltips.
Let us see a simple time series chart example that attempts to realize the concepts mentioned above.
JFreeChartImageWithToolTip.java (Taken from the mailing list archive with minor changes to make use of wicket models.)
Pitfalls to avoid:
- You must use and not
- Do not forget to use the "#" symbol before the "map" id.
Resources & References