• 第五章:fusionchart 的1个维度和3个度量值 显示的数据图形 (32张图)


    aspx.cs:

     private string chartstr = "";
            SaleCount2Service service = new SaleCount2Service();

            private void AddChart(string caption)
            {
                // palette:1-5  调色板
                chartstr = "<chart palette='5' caption='" + caption + "' showValues='1' divLineDecimalPrecision='1' limitsDecimalPrecision='1' PYAxisName='销售量' formatNumberScale='0' baseFont='宋体' baseFontSize='16'>";


                List<SaleCount2Entity> list = service.GetSaleCount2();
                chartstr += "<categories>";
                for (int i = 0; i < list.Count; i++)
                {
                    chartstr += string.Format("<category label='{0}'/>", list[i].UserName);
                }
                chartstr += "</categories><dataset seriesName='汽车销售量' renderAs='area' parentYAxis='P'>";
                for (int j = 0; j < list.Count; j++)
                {
                    chartstr += string.Format("<set value='{0}'/>", list[j].CarNumber);

                }
                chartstr += "</dataset><dataset seriesName='电脑销售量' renderAs='Line' parentYAxis='P'>";
                for (int k = 0; k < list.Count; k++)
                {
                    chartstr += string.Format("<set value='{0}'/>", list[k].ComputerNumber);

                }
                chartstr += "</dataset><dataset seriesName='衣服销售量' renderAs='Line' parentYAxis='P'>";
                for (int h = 0; h < list.Count; h++)
                {
                    chartstr += string.Format("<set value='{0}'/>", list[h].ClothNumber);

                }
                chartstr += "</dataset></chart>";
                chartstr += "";
            }

            public string CreateChart(string flash, string caption)
            {
                AddChart(caption);
                return FusionCharts.RenderChart("fc3/" + flash, "", chartstr, "", "780", "330", false, false);
            }

            /*
             <chart palette='2' caption='Emmy的标题' subCaption='Emmy的副标题' showValues='1' divLineDecimalPrecision='1' limitsDecimalPrecision='1' PYAxisName='销售量' formatNumberScale='0'>

                <categories>
                <category label='A' />
                <category label='B' />
                <category label='C' />
                <category label='D' />
                <category label='E' />
                <category label='F' />
                <category label='G' />
                <category label='H' />
                <category label='I' />
                <category label='J' />
                </categories>

                <dataset seriesName='汽车销售量' renderAs='area' parentYAxis='P'>
                <set value='3242' />
                <set value='3171' />
                <set value='700' />
                <set value='1657' />
                <set value='1566' />
                <set value='1126' />
                <set value='987' />
                <set value='1654' />
                <set value='933' />
                <set value='958' />
                </dataset>

                <dataset seriesName='电脑销售量' renderAs='Line' parentYAxis='P'>
                <set value='332' />
                <set value='71' />
                <set value='70' />
                <set value='15687' />
                <set value='156' />
                <set value='526' />
                <set value='97' />
                <set value='15' />
                <set value='9' />
                <set value='928' />
                </dataset>

                <dataset seriesName='衣服销售量' renderAs='Line' parentYAxis='P'>
                <set value='342' />
                <set value='311' />
                <set value='400' />
                <set value='1287' />
                <set value='1846' />
                <set value='176' />
                <set value='944' />
                <set value='165' />
                <set value='903' />
                <set value='500' />
                </dataset>

                </chart>
             */

    aspx:

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

    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <%=CreateChart("ms/MSColumn3D.swf", "Emmy测试图--MSColumn3D.swf")%>
        </div>

    3维图形如下:

      

      

      

      

      

  • 相关阅读:
    详解RTMP协议视频直播点播平台EasyDSS转推视频直播流到CDN(云直播)
    RTMP协议视频直播点播平台EasyDSS如何实现RTSP视频流地址加密?
    阿里王坚:“城市大脑”开启算力时代
    数据中心网络测试自动化的逐步发展
    在数据中心利用AI的5个理由
    基于层次过滤的文本生成
    解密为何 Go 能从众多语言中脱颖而出
    乔姆斯基专访:深度学习并没有探寻世界本质
    释放数据价值的「三个关键点」
    改改Python代码,运行速度还能提升6万倍,Science:先别想摩尔定律了
  • 原文地址:https://www.cnblogs.com/emmy/p/1867937.html
Copyright © 2020-2023  润新知