Generate charts with open Flash chart

Source: Internet
Author: User
Using open Flash chart to generate a chart access method: http://127.0.0.1/chart/chart.html?ofc=data.php
    1. Hello World

Copy Code
  1. Require_once (' ofc/ofc_chart.php ');
  2. $title = new Ofc_elements_title (' My first table: '. 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. ?>
Copy Code
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.