|
在开源版中没有问题,但是升级到fineuipro下,图表显示不完整。求大神解决
前端代码:
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="chart.aspx.cs" Inherits="FineUIPro.EmptyProjectNet40.chart" %>
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title></title>
- <script type="text/javascript" src="res/js/fCharts/FusionCharts.js" >"></script>
- </head>
- <body>
- <form id="form1" runat="server">
- <f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="contenPanelDiv" />
- <f:ContentPanel ID="contenPanelDiv" ShowHeader="true" Title="测试图表" ShowBorder="false" runat="server" EnableAjax="false">
- <div id="Hispie" style="min-width: 1290px; min-height: 370px;"><%= GetHisChartHtml() %></div>
- </f:ContentPanel>
- </form>
- </body>
- </html>
复制代码 后端代码
- protected String GetHisChartHtml()
- {
- List<Info> infos = new List<Info>();
- for (int i = 1; i < 11; i++)
- {
- Info info = new Info();
- info.Value = "测试"+i.ToString();
- info.Cash = (13+i).ToString();
- infos.Add(info);
- }
- StringBuilder xmlData = new StringBuilder();
- xmlData.Append("<?xml version='1.0' encoding='gb2312' ?>");
- xmlData.AppendFormat("<chart caption='" + "测试" + "收入占比' subcaption='' xAxisName='科目' yAxisName='金额(元)' decimals='2' formatNumberScale='0' exportEnabled='1' >");
- foreach (var item in infos)
- {
- xmlData.AppendFormat("<set label='{0}' value='{1}'/>", item.Value.Trim(), item.Cash);
- }
- xmlData.AppendFormat("</chart>");
- return FusionCharts.RenderChart("Pie3D.swf", "", xmlData.ToString(), "Hischart", "1080", "400",
- false, true);
- }
复制代码
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|