利用open flash chart組建圖表

來源:互聯網
上載者:User
利用open flash chart組建圖表 訪問方式: http://127.0.0.1/chart/chart.html?ofc=data.php
  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. ?>
複製代碼
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    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.