程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> PHP編程 >> 關於PHP編程 >> 使用PHP繪制統計圖

使用PHP繪制統計圖

編輯:關於PHP編程

使用PHP畫統計圖的方法

第一種方法 

View Code

 

 

第二種是用開源工具jpgraph,參見 http://jpgraph.net/features

 

Chart Gallery

Line / Area

Line / Area
  • Line Plots
  • Filled Line Plots
  • Step Line Plots
  • Line Plots With Markers
  • Line Plots With Inverted Y-axis
  • Line Plots With Values

Bar

Bar
  • Standard Bar plots
  • Horizontal Bar plots
  • Adding backgrounds and patterns to bar plots
  • Combined Line and Bar plots

Pie

Pie
  • Pie Plots
  • 3D Pie plots
  • Exploding Pie plots

Scatter

Scatter

Impluse

Impluse

Field

Field

Splines

Splines

Geo Maps

Geo Maps

Stock

Stock

Polar

Polar

Error

Error

Balloon

Balloon

Radar

Radar

Contour

Contour

Others(Pro ver.)

Others(Pro ver.)

 

General features

Below is a number of "one-liners" that describe some of the general features available in JpGraph.

  • Anti-aliasing for Pie charts.
  • More advanced formatting of graph titles including 3D Bevel effects.
  • Additional 3D Bevel formatting feature for the entire Graph
  • Gradient fills for bars are now also displayed in the legend
  • Improvements on legend formatting. It is now possible to have several columns in the legend
  • Improved callback capability for Plot marks. The new callbacks will provide both X and Y coordinates.
  • Footer text can now be used on all graph types
  • dded possibility to use the Freely available Vera TTF fonts. These fonts are available from http://www.gnome.org/fonts/
  • Built in rotation of graphs
  • Fine tuning of legend layout, size and positioning of individual legends and markers.
  • Added possibility to use object methods as callbacks and not only static global functions
  • Full support for color alpha blending
  • Automatic generation of client side image maps to make it possible to generate drill-down graphs.
  • Advanced interpolation with cubic splines to get smooth curves from just a few data points.
  • Several different fill styles for line plots
  • Advanced image 3D effects built-in without external image manipulation programs
  • Supports unlimited number of plots in each graph, makes it easy to compose complex graph which consists of several plot types
  • Additional built-in images for plot marks including 3D rendered markers like diamonds, squares, bevels, balls, pins etc
  • Text strings can now be added to the plot using scale coordinates
  • Support for all primitive URL parameter types with CSIM graphs.
  • Autoscaling will now also consider added lines and texts.
  • Hare/Niemeyer Integer compensation for Pie Plots
  • Added the possibility to use Vertical Gradient fill for line plots.
  • Improved error handling. The visual appearance of the error handling now tries to mimic any windows system window (in graphic)
  • Builtin support to display over 200 country flag and the possibility to use them as icons or markers in the graphs. All the flag images are builtin with JpGraph in an efficient pre-compiled data format.
  • Supports caching (with timeout) of generated graphs to lessen burden of a HTTP server.
  • Intelligent autoscaling which gravitates towards aesthetical values.
  • Fully supports manual scaling, with fine grain control of position of ticks
  • Supports color-gradient fill for bar graphs
  • Supports both vertical and horizontal grids (with image depth specification)
  • Supports both on-the fly image generation and batch processing.
  • Extensive documentation
  • Advanced text formatting using TTF fonts
  • Support for both Chinese and Japanes character sets 

非常多的例子,很好的。

 

第三種用 open flash chart,參見

http://teethgrinder.co.uk/open-flash-chart/gallery-data.php
http://www.helloweba.com/view-blog-41.html
http://www.phphi.cn/post/98/
http://blogold.chinaunix.net/u3/105169/showart_2322209.html
http://hi.baidu.com/duwuzhe722/blog/item/e11b2d2662b512038b82a175.html

 

第四種使用amcharts,參見http://www.amcharts.com

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved