Warning this is an old version.

Take me to the latest version

Charts - Line Charts Menu - Line

Add different data to the graph.

Object: line_dot()

Method: line()

  • line( int $line_width, string $colour, string $key_text[, int $size] )
    Draws a line. This does not have tool tips. This is a bug, and at the moment I'm not sure if it needs fixing.
  • line_dot( int $line_width, int $dot_size, string $colour, string $key_text[, int $key_size] )
  • line_hollow( int $line_width, int $circle_size, string $colour, string $key_text[, int $key_size] )

To add more than one line of data to the graph, call the method set_data() with each line of data. Then set the line style with line()

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

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

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

$line_dot = new line();
$line_dot->set_values( array(1,2,1,null,null,null,null,null) );

$chart = new open_flash_chart();
$chart->set_title$title );
$chart->add_element$line_dot );

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


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