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

A chart with two sets of data, one bar and one line.

A Pareto chart, combination of bar and line chart showing the 80:20 rule. The bar chart shows each persons sales and the line shows cumulative sales.

In our example graph it shows that the sales people who contribute approx. 80% of the total sales are John, Tracy and Joe. These represent approx. 20% of the sales team.

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

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


$data_1 = array(50,25,12,6,3,2,1,1);
$data_2 = array(50,75,87,93,96,98,99,100);


include_once( 
'ofc-library/open-flash-chart.php' );
$g = new graph();
$g->title'Sales ()''{font-size: 30px; color: #2693CF}' );

$g->set_data$data_1 );
$g->bar50'0x639F45''Sales per person'14 );

$g->set_data$data_2 );
$g->line_hollow34'0x2693CF''Cumulative sales'14 );

$g->set_x_labels( array( 'John','Tracy','Joe','Dan','Em','Gar','Elbow','Mur' ) );
$g->set_y_max100 );
$g->y_label_steps10 );
$g->set_y_legend'Percentage of total sales'14'0x639F45' );
echo 
$g->render();
?>
To see the data produced : gallery-data-17.php, then 'view source'.
Help support the project: Support This Project

Adverts: