ToolTips - version 0.9.13

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
rodraguirre
Posts: 3
Joined: Tue Jun 29, 2004 11:17 pm

ToolTips - version 0.9.13

Post by rodraguirre » Fri Jul 02, 2004 7:02 pm

Well, I'm using version 0.9.13. First I'll show a piece of my code:

Code: Select all

XYToolTipGenerator ttg;
ttg = new TimeSeriesToolTipGenerator("'Hora: 'kk:mm", "'Valor: '###,###.00" );
StandardXYItemRenderer renderer = new StandardXYItemRenderer(StandardXYItemRenderer.LINES, ttg);
well, when I point the mouse over a line in my chart, that's what I get in the tooltip text:

"VlnC: date = Hora: 19:05, value = Valor: 196,084.06"

And I want it to be like that:

"VlnC: Hora: 19:05, Valor: 196,084.06"

I mean, is there a way to supress, get rid of, BLOW AWAY these "date" and "value" texts? Remembering: I'm using version 0.9.13, so, the only constructors for TimeSeriesToolTipGenerators are:

Code: Select all

TimeSeriesToolTipGenerator()

Code: Select all

TimeSeriesToolTipGenerator(java.text.DateFormat dateFormat, java.text.NumberFormat numberFormat)

Code: Select all

TimeSeriesToolTipGenerator(java.lang.String dateFormat, java.lang.String valueFormat)

richard_atkinson
Posts: 115
Joined: Fri Mar 14, 2003 3:13 pm
Location: London, England
Contact:

TimeSeriesToolTipGenerator

Post by richard_atkinson » Fri Jul 02, 2004 8:57 pm

Just implement another class which implements XYToolTipGenerator and use that instead. You can use the TimeSeriesToolTipGenerator as a template.

Regards,
Richard...

Locked