Info: Open Flash Chart 2 is out. Version 1.x and these pages will
never disappear and the charts will continue working forever, but further
development on 1.x has stopped. Take a look at version 2 here
Open Flash Chart 2.
Gallery - Tool Tip
set_tool_tip()
set_tool_tip( string $tip )
The tool tip string has (due to popular demand) lots of magic values to remember.
The text #val# is replaced with the actual value of whatever the mouse is over.
So in our example above the tool tip is set:
$g->set_tool_tip( 'Price: £#val#.00' );
so as the mouse is moved over various elements, the actual value is inserted
into the tooltip string, replacing the #val#. For example the value 2 becomes the tooltip Price: £2.00.
The text #key# is replaced with the key string. So
$g->set_tool_tip( '#key#: £#val#.00' );
would display 'Earnings: £2.00'.
The text <br> is a newline.
The text #x_label# is replaced with the X label string. So
would display (depending on what you are mouse overing):
Earnings Jan: £2.00
The text #x_legend# is replaced with the X axis legend text.
The text #tip# is replaced with any extra text you want
to display for a single data point or bar in a bar chart.
If no tooltip is set, the default is to show the #x_label# value as the title and the #val# on the second line.
If there are many lines of tooltip, the first line is the title, and the others are displayed below it. If there
is only one line, it is displayed as normal, not as a title.