Using open Flash chart to generate a chart access method: http://127.0.0.1/chart/chart.html?ofc=data.php
Hello World
Copy Code
- Require_once (' ofc/ofc_chart.php ');
- $title = new Ofc_elements_title (' My first table: '. Date ("D M D Y"));
- $line _dot = new Ofc_charts_line ();
- $line _dot->set_values (Array (6,2,7,8,10,12,7,6,5,12,10,9,11,4,3,2,1));
- $line _dot->set_colour (' #D7E4A3 ');
- $line _dot1 = new Ofc_charts_line ();
- $line _dot1->set_values (Array (2,4,6,8,11,9,12,8,10,6,15,14,8,7,6,8,9,2,1));
- $chart = new Ofc_chart ();
- $chart->set_title ($title);
- $x =new ofc_elements_axis_x ();
- $x->set_offset (FALSE);
- $x->set_steps (1);
- $x->set_colour (' #A2ACBA ');
- $x->set_range (0,20,1);
- $y =new ofc_elements_axis_y ();
- $y->set_range (0,16,1);
- $y->set_steps (1);
- $y->set_colour (' #A2ACBA ');
- $chart->set_x_axis ($x);
- $chart->set_y_axis ($y);
- $chart->add_element ($line _dot);
- $chart->add_element ($line _dot1);
- echo $chart->toprettystring ();
- ?>
Copy Code |