Charts - Line Charts Menu - Line Star

The star object inherits a lot of methods from the dot_base.

For details of how we changed the key text styles, see Line and Key.

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", "400",
"9.0.0", "expressInstall.swf",
{"data-file":"gallery/line-star.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-star.php
<?php

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


$data = array();
$data2 = array();

for( 
$i=0$i<6.2$i+=0.2 )
{
  
$data[] = (sin($i) * 7) + 8;
  
$data2[] = (sin($i) * 7) + 11;
}

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

$s = new star();
$s->size(6)->halo_size(2);

$line = new line();
$line->set_default_dot_style($s);
$line->set_values$data );
$line->set_width);

$s2 = new star();
$s2->size(6)->halo_size(2)->colour('#f00000')->rotation(180)->hollow(false);

$line2 = new line();
$line2->set_default_dot_style($s2);
$line2->set_values$data2 );
$line2->set_width);

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


$chart = new open_flash_chart();
$chart->set_title$title );
$chart->add_element$line );
$chart->add_element$line2 );
$chart->set_y_axis$y );

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


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