zoukankan      html  css  js  c++  java
  • fusionCharts

    1.fusionCharts 从后台获取数据可以保存在xml文件中,也可以直接加载在页面中。

    (1)直接加载在页面中:

    <script language="JavaScript" src="FusionCharts.js"></script>

    <div id="chartdiv" align="center">The chart will appear within this DIV. This text will be replaced by the chart.</div>

    <script type="text/javascript">

    var myChart = new FusionCharts("Column3D.swf", "myChartId", "900", "300", "0", "0");

    var xmls=
    "<chart caption='产品' xAxisName='名称' yAxisName='价格' showValues='0' decimals='0' formatNumberScale='0'>"+
    "<set label='冬瓜' value='2.0000'/>"+
    "<set label='香蕉' value='20.0000'/>"+
    "<set label='葡萄' value='20.0000'/>"+
    "<set label='纯净水' value='20.0000'/>"+
    "<set label='苹果' value='12.0000'/>"+
    "<set label='啤酒' value='10.0000'/>"+
    "<set label='牙刷' value='6.5000'/>"+
    "<set label='牙膏' value='12.0000'/>"+
    "<set label='茶叶' value='100.0000'/>"+
    "<set label='茶杯' value='34.0000'/>"+
    "<set label='基拉' value='43.0000'/>"+
    "<set label='牛奶' value='90.0000'/>"+
    "</chart>";

    myChart.setDataXML(xmls);
    myChart.render("chartdiv");

    </script>

    (2)从xml中加载数据,尚未实现

  • 相关阅读:
    如何快速方便的输出向量vector容器中不重复的内容
    System.IO.FileInfo.cs
    System.IO.FileSystemInfo.cs
    System.IO.FileAttributes.cs
    System.IO.StreamWriter.cs
    System.IO.TextWriter.cs
    System.IO.StreamReader.cs
    System.IO.FileStream.cs
    System.IO.FileOptions.cs
    System.IO.FileShare.cs
  • 原文地址:https://www.cnblogs.com/zhuxiang1633/p/7614999.html
Copyright © 2011-2022 走看看