没有Flash Player的Fusion图表

时间:2017-03-16 04:29:10

标签: asp.net fusioncharts

我正在使用Fusion Chart Version2.2 for asp.net。安装Flash播放器时网页运行正常。我可以在不安装此Flash播放器的情况下运行应用程序我正在使用FusionCharts.js

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

我的代码在这里,

    //strXML will be used to store the entire XML document generated
    string strXML = null;
    //Generate the graph element
    strXML = @"<graph caption='" + strCaption + @"' subCaption='" + strSubCaption + @"' decimalPrecision='0' pieSliceDepth='30' formatNumberScale='0'
      xAxisName='" + xAxis + @"' yAxisName='" + yAxis + @"' rotateNames='1'>";

    int i = 0;
    foreach (DataRow dr2 in dt.Rows)
    {
        strXML += "<set name='" + dr2[0].ToString() + "' value='" + dr2[1].ToString() + "' color='" + color[i] + @"'  link=&quot;JavaScript:myJS('" + dr2["month"].ToString() + ", " + dr2["sales"].ToString() + "'); &quot;/>";
        i++;

    }

    //Finally, close <graph> element
    strXML += "</graph>";

    FCLiteral1.Text = FusionCharts.RenderChartHTML(
        "FusionCharts/FCF_Column3D.swf", // Path to chart's SWF
        "",                              // Leave blank when using Data String method
        strXML,                          // xmlStr contains the chart data
        "mygraph1",                      // Unique chart ID
        GraphWidth, GraphHeight,                   // Width & Height of chart
        false
        );

我可以使用相同的版本2.2还是需要升级版本?

1 个答案:

答案 0 :(得分:2)

您使用的是不推荐使用的基于Flash的版本。尝试使用FusionCharts升级版本,并确保生成的xml结构符合FusionCharts规定的格式。

与此同时,您可以查看详细博客,了解如何在VB.NET中从数据库渲染FusionCharts支持的图表http://www.fusioncharts.com/blog/2017/02/rendering-fusioncharts-vb-net-using-database/