Charts - Line Charts Menu - Line Step

Note: this chart is a scatter line chart.

This goes into the <head> of the page:

<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF(
"open-flash-chart.swf", "my_chart", "550", "200",
"9.0.0", "expressInstall.swf",
{"data-file":"gallery/line-step.php"} );
</script>
This writes the chart into a div with id="my_chart", right click and view source to see it in action, [the tutorials have more details]

gallery/line-step.php
<?php

include '../php-ofc-library/open-flash-chart.php';

$title = new titledate("D M d Y") );

$line_1 = new scatter_line('#ff0000'3);
$line_1->set_values(
    array(
        new 
scatter_value(11),
        new 
scatter_value(22),
        new 
scatter_value(31)
        ));
$line_1->set_key'No step'10 );


$line_2 = new scatter_line('#6D8F47'3);
$line_2->set_values(
    array(
        new 
scatter_value(41),
        new 
scatter_value(52),
        new 
scatter_value(61)
        ));
$line_2->set_step_horizontal();
$line_2->set_key'Step horizontal'10 );

$line_3 = new scatter_line('#7F6547'3);
$line_3->set_values(
    array(
        new 
scatter_value(71),
        new 
scatter_value(82),
        new 
scatter_value(91)
        ));
$line_3->set_step_vertical();
$line_3->set_key'Step vertical'10 );

$y = new y_axis();
$y->set_range0);

$chart = new open_flash_chart();
$chart->set_title$title );
$chart->add_element$line_1 );
$chart->add_element$line_2 );
$chart->add_element$line_3 );
$chart->set_y_axis$y );

echo 
$chart->toPrettyString();
To see the data produced : gallery/line-step.php, then 'view source'.
Support This Project
Adverts:


Open Flash Chart logo by numb.me.uk. | Syntax highlights are by GeSHi