Charts - Radar Charts - Radar Chart Lines

Personally, I find a chart with fewer adornments easier to read.

We fill the line with custom points, each with a tooltip that shows the value and the spoke name.

The radar axis max value is set to 150 and the setps value to 10.

This goes into the <head> of the page:

<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript">

"open-flash-chart.swf", "my_chart",
"400", "460", "9.0.0", "expressInstall.swf",
{"data-file":"gallery/radar-chart-steps.php"} );

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]


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

$chart = new open_flash_chart();
$chart->set_title( new title'Radar Chart' ) );

$values = array(30,50,60,70,80,90,100,115,130,115,100,90,80,70,60,50);
$spokes = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p');
$vals = array();

$i=0$i<count($values); $i++ )
$tmp = new solid_dot($values[$i]);
$tmp->colour('#D41E47')->tooltip("#val#<br>Spoke: {$spokes[$i]}");
$vals[] = $tmp;

$line = new line();
$line->set_values$vals );
$line->set_colour'#FBB829' );
$line->set_key'Hearts'10 );

// add the area object to the chart:
$chart->add_element$line );

$r = new radar_axis150 );
$r->set_colour'#DAD5E0' );
$r->set_grid_colour'#EFEFEF' );
$chart->set_radar_axis$r );

$tooltip = new tooltip();
$chart->set_tooltip$tooltip );

$chart->set_bg_colour'#ffffff' );

To see the data produced : gallery/radar-chart-steps.php, then 'view source'.
Support This Project

Open Flash Chart logo by | Syntax highlights are by GeSHi