Open Flash Chart
Support This Project :: Home - Gallery - Line - Extra Tooltip Info - Bar
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 - Bar

Add extra tooltip info per data point.

See Line Extras - add_data_tip() for details.

Create the flash object
<?php
include_once 'ofc-library/open_flash_chart_object.php';
open_flash_chart_object500260'http://'$_SERVER['SERVER_NAME'] .'/open-flash-chart/gallery-data-52.php' );
?>
gallery-data-52.php
<?php

include_once( 'ofc-library/open-flash-chart.php' );

// generate some random data
srand((double)microtime()*1000000);

$months = array( 'January','February','March','April','May','June','July','August','September','October' );
$year '2006';

$bar = new bar_sketch556'#d070ac''#000000' );
$bar->key$year10 );

for( 
$i=0$i<10$i++ )
{
    
$tmp rand(2,9);
    
$tip 'Title!<br>Test weird characters: &,%,,$<br>'$year .', '$months[$i] .' = '$tmp;
    
$bar->add_data_tip$tmp$tip );
}


$g = new graph();
$g->title'Sketch''{font-size:20px; color: #ffffff; margin:10px; background-color: #d070ac; padding: 5px 15px 5px 15px;}' );
$g->bg_colour '#FDFDFD';


//
// add the bar object to the graph
//
$g->data_sets[] = $bar;

//
// LOOK!!! this is the important bit:
//
$g->set_tool_tip'#tip#' );
//
//
//

$g->x_axis_colour'#e0e0e0''#e0e0e0' );
$g->set_x_tick_size);
$g->y_axis_colour'#e0e0e0''#e0e0e0' );

$g->set_x_labels$months );
$g->set_x_label_style11'#303030');
$g->set_y_label_style11'#303030');

$g->set_y_max10 );
$g->y_label_steps);
echo 
$g->render();
?>
To see the data produced : gallery-data-52.php, then 'view source'.
Help support the project: Support This Project

Adverts: