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 - Line - Extra Tooltip Info
Add extra tooltip info per data point.
Method: add_data_tip( $data, string $tip )
This will add a data point to the line object (or line_hollow or line_dot) along with some extra
tooltip info.
You need to modify the tooltip string to display this extra tooltip info, the magic value is #tip#:
//
// NOTE: the extra tooltip info is on the second line
// of the tooltip:
//
$g->set_tool_tip( '#x_label# [#val#]<br>#tip#' );
Note: you can also include <br> in the #tip#, so you can create your own multi-line tooltip for each
data point (or bar in a bar chart) e.g:
// .... your code ....
$data_1->add_data_tip( rand(14,19), 'Title<br>Line 1<br>Line 2' );
// .... more code ....
$g->set_tool_tip( '#tip#' );
// .... more code and render (see example)
// generate some random data srand((double)microtime()*1000000);
// // NOTE: how we are filling 3 arrays full of data, // one for each line on the graph // $data_1 = new line( 2, '#9933CC' ); $data_1->key( 'Page views', 10 );