PDA

View Full Version : #x_label# magic value for LineChart tooltips doesn't work



pgraham
20 Aug 2009, 9:09 AM
Hi all,

I am trying to use the #x_label# magic value for LineCharts as documented here:

http://teethgrinder.co.uk/open-flash-chart-2/tooltip.php

and demonstrated here:

http://teethgrinder.co.uk/open-flash-chart-2/adv-line-dot.php



...

$default_dot = new dot();
$default_dot->size(3)->colour('#DFC329')->tooltip( '#x_label#:#val#' );...
To Reproduce:
Create a chart with the following LineChart added as a ChartConfig



LineChart chart = new LineChart();
for (int val : values) {
HollowDot dot = new HollowDot(val);
dot.setTooltip("#x_label#<br>#val#%");

chart.addDots(dot);
}

Result:
The previous code when rendered shows blank space instead of the #x_label# value.

sven
20 Aug 2009, 9:13 AM
Moving this to the help forum as that is the correct place

Arno.Nyhm
21 Aug 2009, 2:26 AM
i think its the same question you asked here:
http://extjs.com/forum/showthread.php?t=78220

pgraham
28 Aug 2009, 10:05 AM
The questions are similar but slightly different.

The other thread I'm asking why applying a tooltip at the ChartConfig level doesn't work. Here I'm asking why when I apply a tooltip to the dots directly, (which is the recommended solution in the other thread) the #x_label# value doesn't display properly

xalvaro
15 Jan 2010, 8:09 AM
are OFC already supported by gxt?

I need this "x_label" value too.

For now i'm thinking of using another library for charts instead of gxt's one

pgraham
1 Feb 2010, 6:53 AM
Due to a lack of support I abandoned the GXT OFC support and am now using the GWT support for the Google Visualizations API.

http://code.google.com/docreader/#p=gwt-google-apis&s=gwt-google-apis&t=Visualization

xalvaro
1 Feb 2010, 6:58 AM
The problem is that library needs a constant connexion to
Google which can not be evident for our customers.


I'm trying for the moment : Gflot which is fully javascript

http://code.google.com/p/gflot/

Arno.Nyhm
1 Feb 2010, 7:15 AM
thanks both for the interesting ideas.

if you have it working it would be nice if you post some small example code how it works together with GXT :-)