Open Flash Chart
Support This Project :: Home - Gallery - Line and Key
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 and Key

Change the style of the line and of the key text.

Methods: See data lines.

By default the key text is the same colour as the line it labels. Adding a key moves and resizes the other chart elements.

For details of how we added two lines of data to this chart, see Data Lines.

Create the flash object
include_once 'ofc-library/open_flash_chart_object.php';
open_flash_chart_object500250'http://'$_SERVER['SERVER_NAME'] .'/open-flash-chart/gallery-data-7.php' );


// generate some random data

$data_1 = array();
$data_2 = array();
$i=0$i<13$i++ )
$data_1[] = rand(11,19);
$data_2[] = rand(1,10);

'ofc-library/open-flash-chart.php' );
$g = new graph();

// line 1:
$g->set_data$data_1 );
// 3 pixels wide line, with a 6 pixel dot (and tooltip)
$g->line_dot36'#9933CC''Earnings'18 );

// line 2:
$g->set_data$data_2 );
// 2 pixel line, no dot
$g->line2'#50CC33''Beer money'18 );

$g->set_x_labels$data_2 );
$g->set_y_max20 );
$g->title'Proffit''{font-size: 25px; color: #FF8040}' );
To see the data produced : gallery-data-7.php, then 'view source'.
Help support the project: Support This Project