- <html>
- <head>
- </head>
- <body>
- <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
- codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
- width="800"
- height="450" id="graph-2" align="middle">
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="movie" value="open-flash-chart.swf" />
- <param name="quality" value="high" />
- <embed src="open-flash-chart.swf" quality="high" bgcolor="#FFFFFF" width="500" height="450" name="open-flash-chart" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
- </object>
- </body>
- </html>
数据文件格式(data.json.txt)如下:
- {
- "title":{
- "text": "上传下载统计报表",
- "style": "{font-size: 20px; color:#000000; font-family: Verdana; text-align: center;}"
- },
- "y_legend":{
- "text": "Upload And Download",
- "style": "{color: #736AFF; font-size: 12px;}"
- },
- "elements":[
- {
- "type": "bar",
- "alpha": 0.6,
- "colour": "#4BB2C5",
- "text": "上传",
- "font-size": 10,
- "values" : [9,6,7,9,5,7,6,9,7,10,13,15]
- },
- {
- "type": "bar",
- "alpha": 0.6,
- "colour": "#CC9933",
- "text": "下载",
- "font-size": 10,
- "values" : [6,7,9,5,7,6,9,7,3,13,12,16]
- }
- ],
- "x_axis":{
- "stroke": 2,
- "tick_height": 10,
- "colour":"#999999",
- "grid_colour":"#00ff00",
- "labels": {
- "labels": ["January","February","March","April","May","June","July","August","Spetember","October","November","December"]
- }
- },
- "y_axis":{
- "stroke": 2,
- "tick_length": 3,
- "colour": "#999999",
- "grid_colour": "#00ff00",
- "offset": 0,
- "max": 20
- }
- }
{ "title":{ "text": "上传下载统计报表", "style": "{font-size: 20px; color:#000000; font-family: Verdana; text-align: center;}" }, "y_legend":{ "text": "Upload And Download", "style": "{color: #736AFF; font-size: 12px;}" }, "elements":[ { "type": "bar", "alpha": 0.6, "colour": "#4BB2C5", "text": "上传", "font-size": 10, "values" : [9,6,7,9,5,7,6,9,7,10,13,15] }, { "type": "bar", "alpha": 0.6, "colour": "#CC9933", "text": "下载", "font-size": 10, "values" : [6,7,9,5,7,6,9,7,3,13,12,16] } ], "x_axis":{ "stroke": 2, "tick_height": 10, "colour":"#999999", "grid_colour":"#00ff00", "labels": { "labels": ["January","February","March","April","May","June","July","August","Spetember","October","November","December"] } }, "y_axis":{ "stroke": 2, "tick_length": 3, "colour": "#999999", "grid_colour": "#00ff00", "offset": 0, "max": 20 } }
地址栏输入:http://localhost/open-flash-chart/chart.html?ofc=data.json.txt即可