日期:2014-05-16 浏览次数:20344 次
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=GBK" /> <title>My First chart using FusionCharts - JSON data URL</title> <link rel="stylesheet" type="text/css" media="all" href="ExtJS/resources/css/ext-all.css" /> <script type="text/javascript" src="ExtJS/adapter/ext/ext-base.js"></script> <script type="text/javascript" src="ExtJS/ext-all.js"></script> <script type="text/javascript" src="xml2json.js"></script> <script type="text/javascript" src="FusionCharts/FusionCharts.js"></script> </head> <body> <div id="chartContainer">FusionCharts will load here!</div> <script type="text/javascript"> <!-- Ext.BLANK_IMAGE_URL = 'ExtJS/resources/images/default/s.gif'; //左边功能树 Ext.onReady(function(){ var win=new Ext.Window({ title:'falsh报表展示1', layout:'fit', width:500, height:400, closeAction:'close', plain:true, html:'<div id="chart1div"></div>' }); var panel=new Ext.Panel({ title:'3D柱状图', html:'<div id="chart2div"></div>' }); win.add(panel); win.show(); var Chart2 = new FusionCharts( "FusionCharts/Column3D.swf", "Chart2Id", "400", "300", "0", "1" ); //Chart2.setJSONUrl("Data.json"); Chart2.setJSONData( {"chart":{ "caption" : "电压统计值", "xAxisName" : "季度", "yAxisName" : "电压值", "numberprefix" : "V" }, "categories":[ { "category":[ { "label":"1季度"}, { "label":"2季度"}, { "label":"3季度"}, { "label":"4季度"}, { "label":"5季度"} ] } ], "dataset":[ { "seriesname":"监测点1", "color":"AFD8F8", "showvalues":"0", "data" : [ {"value" : "14400"}, {"value" : "19600"}, {"value" : "24000"}, {"value" : "15700"} ] }, { "seriesname":"监测点2", "color":"F6BD0F", "showvalues":"0", "data" : [