StandartXYToolTipGenerator always show the Key of Series as ToolTip. What about if I need to show some other text but not key? How to implement it?
Thanks.
Customize ToolTip Text for TimeSeriesGraph
-
- Posts: 844
- Joined: Fri Oct 13, 2006 9:29 pm
- Location: Sunnyvale, CA
Re: Customize ToolTip Text for TimeSeriesGraph
Take a look at the StandardXYToolTip JavaDoc entry (the JavaDoc is there for a reason). You will see that StandardXYToolTipGenerator implments XYToolTipGenerator interface. For a custom tool tip, create a class that implements the XYToolTipGenerator interface. There are plenty of examples if you search the forum and the source code.rspan wrote:StandartXYToolTipGenerator always show the Key of Series as ToolTip. What about if I need to show some other text but not key? How to implement it?
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
The tooltip text is displayed using Swing's tooltip mechanism. This supports some HTML - see the following:
http://java.sun.com/docs/books/tutorial ... /html.html
http://java.sun.com/docs/books/tutorial ... /html.html
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

