Use open flash chart to generate charts

WBOY
Release: 2016-07-25 09:10:00
Original
1037 people have browsed it
利用open flash chart生成图表 访问方式: http://127.0.0.1/chart/chart.html?ofc=data.php Use open flash chart to generate charts
  1. Hello World

复制代码
  1. require_once('OFC/OFC_Chart.php');
  2. $title = new OFC_Elements_Title( '我的第一表:'.date("D M d Y") );
  3. $line_dot = new OFC_Charts_Line();
  4. $line_dot->set_values( array(6,2,7,8,10,12,7,6,5,12,10,9,11,4,3,2,1) );
  5. $line_dot->set_colour('#D7E4A3');
  6. $line_dot1 = new OFC_Charts_Line();
  7. $line_dot1->set_values( array(2,4,6,8,11,9,12,8,10,6,15,14,8,7,6,8,9,2,1) );
  8. $chart = new OFC_Chart();
  9. $chart->set_title( $title );
  10. $x=new OFC_Elements_Axis_X();
  11. $x->set_offset(false);
  12. $x->set_steps(1);
  13. $x->set_colour( '#A2ACBA');
  14. $x->set_range(0,20,1);
  15. $y=new OFC_Elements_Axis_Y();
  16. $y->set_range(0,16,1);
  17. $y->set_steps(1);
  18. $y->set_colour( '#A2ACBA');
  19. $chart->set_x_axis($x);
  20. $chart->set_y_axis($y);
  21. $chart->add_element( $line_dot );
  22. $chart->add_element( $line_dot1 );
  23. echo $chart->toPrettyString();
  24. ?>
复制代码


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template