【第22期】观点:IT 行业加班,到底有没有价值?

Ext.Net 1.x_Ext.Net.Panel组合MSCHART

原创 2012年03月21日 15:43:33

 注意:

AJAX控件添加MS控件 <Content>.....</Content>

<form id="form1" runat="server">
    <link href="../../../../resources/css/examples.css" rel="stylesheet" type="text/css" />
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Panel ID="Panel1" runat="server" Height="700"  Title="产品季度销售分布">
         <TopBar>
            <ext:Toolbar ID="Toolbar1" runat="server">
                <Content>
                        <asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged"
                            RepeatDirection="Horizontal" Width="200px">
                            <asp:ListItem Selected="True" Value="ZE">电子公司</asp:ListItem>
                            <asp:ListItem Value="ZM">磁电公司</asp:ListItem>
                        </asp:RadioButtonList>
                </Content>
            </ext:Toolbar>
        </TopBar>
            <Items>
                <ext:Panel ID="Panel2" runat="server" Height="320"   Border="false">
                    <Items>
                         <ext:ColumnLayout ID="ColumnLayout1" runat="server" Split="true" FitHeight="true">
                            <Columns>
                                <ext:LayoutColumn ColumnWidth="0.5">
                                    <ext:Panel ID="Panel4" runat="server" Title="第一季度">
                                     <Content>
                                                <asp:Chart ID="ChartQ1" runat="server"  BackColor="LightSteelBlue" 
                                                    BackGradientStyle="TopBottom" BackSecondaryColor="AliceBlue"  EnableTheming="False" 
                                                    EnableViewState="True" Width ="400">
                                                    <Titles>
                                        <%--            <asp:Title  Font="微软雅黑, 16pt" Text="本月业务员出货饼图" Alignment="TopCenter"></asp:Title>--%>
			                                        <asp:Title Docking="Bottom" Font="Trebuchet MS, 8.25pt" 
                                                                            Text="Zettlercn Corporation" Alignment="MiddleRight"></asp:Title>
                                                    </Titles>
                                                    <legends>
			                                            <asp:Legend BackColor="Transparent" Alignment="Center" Docking="Bottom" Font="Trebuchet MS, 8.25pt, style=Bold" IsTextAutoFit="False" Name="Default" LegendStyle="Row"></asp:Legend>
		                                            </legends>
                                                    <Series>
                                                        <asp:Series Name="Series1" BorderColor="180, 26, 59, 105" Color="220, 65, 140, 240" >
                                                        </asp:Series>
                                                    </Series>
                                                    <ChartAreas >
								                                        <asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BackSecondaryColor="Transparent" BackColor="Transparent" ShadowColor="Transparent" BorderWidth="0" >
									                                        <area3dstyle Rotation="0" />
									                                        <axisy LineColor="64, 64, 64, 64">
										                                        <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
										                                        <MajorGrid LineColor="64, 64, 64, 64" />
									                                        </axisy>
									                                        <axisx LineColor="64, 64, 64, 64">
										                                        <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
										                                        <MajorGrid LineColor="64, 64, 64, 64" />
									                                        </axisx>
								                                        </asp:ChartArea>
                                                    </ChartAreas>
                                                </asp:Chart>
                                     </Content>
                                     </ext:Panel>
                                </ext:LayoutColumn> 
                                <ext:LayoutColumn ColumnWidth="0.5">
                                    <ext:Panel ID="Panel5" runat="server" Title="第二季度" >
                                      <Content>
                                                <asp:Chart ID="ChartQ2" runat="server"  BackColor="LightSteelBlue" 
                                                    BackGradientStyle="TopBottom" BackSecondaryColor="AliceBlue"  EnableTheming="False" 
                                                    EnableViewState="True" Width ="400">
                                                    <Titles>
                                        <%--            <asp:Title  Font="微软雅黑, 16pt" Text="本月业务员出货饼图" Alignment="TopCenter"></asp:Title>--%>
			                                        <asp:Title Docking="Bottom" Font="Trebuchet MS, 8.25pt" 
                                                                            Text="Zettlercn Corporation" Alignment="MiddleRight"></asp:Title>
                                                    </Titles>
                                                    <legends>
			                                            <asp:Legend BackColor="Transparent" Alignment="Center" Docking="Bottom" Font="Trebuchet MS, 8.25pt, style=Bold" IsTextAutoFit="False" Name="Default" LegendStyle="Row"></asp:Legend>
		                                            </legends>
                                                    <Series>
                                                        <asp:Series Name="Series1" BorderColor="180, 26, 59, 105" Color="220, 65, 140, 240" >
                                                        </asp:Series>
                                                    </Series>
                                                    <ChartAreas >
								                                        <asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BackSecondaryColor="Transparent" BackColor="Transparent" ShadowColor="Transparent" BorderWidth="0" >
									                                        <area3dstyle Rotation="0" />
									                                        <axisy LineColor="64, 64, 64, 64">
										                                        <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
										                                        <MajorGrid LineColor="64, 64, 64, 64" />
									                                        </axisy>
									                                        <axisx LineColor="64, 64, 64, 64">
										                                        <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
										                                        <MajorGrid LineColor="64, 64, 64, 64" />
									                                        </axisx>
								                                        </asp:ChartArea>
                                                    </ChartAreas>
                                                </asp:Chart>
                                     </Content>
                                     </ext:Panel>
                                </ext:LayoutColumn>
                            </Columns>
                        </ext:ColumnLayout>

                    </Items>
                </ext:Panel>
               <ext:Panel ID="Panel3" runat="server" Height="320"  Border="false">
                    <Items>
                            <ext:ColumnLayout ID="ColumnLayout2" runat="server" Split="true" FitHeight="true">
                            <Columns>
                                <ext:LayoutColumn ColumnWidth="0.5">
                                    <ext:Panel ID="Panel6" runat="server" Title="第三季度" >
                                     <Content>
                                                <asp:Chart ID="ChartQ3" runat="server"  BackColor="LightSteelBlue" 
                                                    BackGradientStyle="TopBottom" BackSecondaryColor="AliceBlue"  EnableTheming="False" 
                                                    EnableViewState="True" Width ="400">
                                                    <Titles>
                                        <%--            <asp:Title  Font="微软雅黑, 16pt" Text="本月业务员出货饼图" Alignment="TopCenter"></asp:Title>--%>
			                                        <asp:Title Docking="Bottom" Font="Trebuchet MS, 8.25pt" 
                                                                            Text="Zettlercn Corporation" Alignment="MiddleRight"></asp:Title>
                                                    </Titles>
                                                    <legends>
			                                            <asp:Legend BackColor="Transparent" Alignment="Center" Docking="Bottom" Font="Trebuchet MS, 8.25pt, style=Bold" IsTextAutoFit="False" Name="Default" LegendStyle="Row"></asp:Legend>
		                                            </legends>
                                                    <Series>
                                                        <asp:Series Name="Series1" BorderColor="180, 26, 59, 105" Color="220, 65, 140, 240" >
                                                        </asp:Series>
                                                    </Series>
                                                    <ChartAreas >
								                                        <asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BackSecondaryColor="Transparent" BackColor="Transparent" ShadowColor="Transparent" BorderWidth="0" >
									                                        <area3dstyle Rotation="0" />
									                                        <axisy LineColor="64, 64, 64, 64">
										                                        <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
										                                        <MajorGrid LineColor="64, 64, 64, 64" />
									                                        </axisy>
									                                        <axisx LineColor="64, 64, 64, 64">
										                                        <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
										                                        <MajorGrid LineColor="64, 64, 64, 64" />
									                                        </axisx>
								                                        </asp:ChartArea>
                                                    </ChartAreas>
                                                </asp:Chart>
                                     </Content>
                                     </ext:Panel>
                                </ext:LayoutColumn> 
                                <ext:LayoutColumn ColumnWidth="0.5">
                                    <ext:Panel ID="Panel7" runat="server" Title="第四季度" >
                                     <Content>
                                                <asp:Chart ID="ChartQ4" runat="server"  BackColor="LightSteelBlue" 
                                                    BackGradientStyle="TopBottom" BackSecondaryColor="AliceBlue"  EnableTheming="False" 
                                                    EnableViewState="True" Width ="400">
                                                    <Titles>
                                        <%--            <asp:Title  Font="微软雅黑, 16pt" Text="本月业务员出货饼图" Alignment="TopCenter"></asp:Title>--%>
			                                        <asp:Title Docking="Bottom" Font="Trebuchet MS, 8.25pt" 
                                                                            Text="Zettlercn Corporation" Alignment="MiddleRight"></asp:Title>
                                                    </Titles>
                                                    <legends>
			                                            <asp:Legend BackColor="Transparent" Alignment="Center" Docking="Bottom" Font="Trebuchet MS, 8.25pt, style=Bold" IsTextAutoFit="False" Name="Default" LegendStyle="Row"></asp:Legend>
		                                            </legends>
                                                    <Series>
                                                        <asp:Series Name="Series1" BorderColor="180, 26, 59, 105" Color="220, 65, 140, 240" >
                                                        </asp:Series>
                                                    </Series>
                                                    <ChartAreas >
								                                        <asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BackSecondaryColor="Transparent" BackColor="Transparent" ShadowColor="Transparent" BorderWidth="0" >
									                                        <area3dstyle Rotation="0" />
									                                        <axisy LineColor="64, 64, 64, 64">
										                                        <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
										                                        <MajorGrid LineColor="64, 64, 64, 64" />
									                                        </axisy>
									                                        <axisx LineColor="64, 64, 64, 64">
										                                        <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
										                                        <MajorGrid LineColor="64, 64, 64, 64" />
									                                        </axisx>
								                                        </asp:ChartArea>
                                                    </ChartAreas>
                                                </asp:Chart>
                                     </Content>
                                     </ext:Panel>
                                </ext:LayoutColumn>
                            </Columns>
                        </ext:ColumnLayout>
                    </Items>
                </ext:Panel>
            </Items>
        </ext:Panel>

后台:

private void DataChart(Chart ChartQ, int Quarter)
    {
        ProductByQuarter pq = new ProductByQuarter();
        for (int i = 0; i < RadioButtonList1.Items.Count; i++)
        {
            if (RadioButtonList1.Items[i].Selected)
            {

                pq.Company = RadioButtonList1.Items[i].Value.Trim();
            }
        }
        
        pq.Quarter = Quarter;
        ProductByQuarterManager pqmgr = new ProductByQuarterManager();

        if (pqmgr.ProductByQuarterList(pq).Rows.Count > 0)
        {

            ChartQ.Series["Series1"].Points.DataBind(pqmgr.ProductByQuarterList(pq).DefaultView, "产品类别", "金额", "");
            ChartQ.Width = 400;
            ChartQ.Height = 300;
            ChartQ.Series["Series1"].ChartType = (SeriesChartType)Enum.Parse(typeof(SeriesChartType), "Doughnut", true);
            //环形
            ChartQ.Series["Series1"]["PieLabelStyle"] = "Outside";
            //显示数据
            ChartQ.Series["Series1"].IsValueShownAsLabel = true;
            //显示百分比
            //ChartQ.Series[0].Label = "#VALX #PERCENT{P} #VALY";
            ChartQ.Series[0].Label = "#VALX #VALY";
            //显示Legends
            ChartQ.Legends[0].Enabled = true;
            //3D
            ChartQ.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = false;

            ChartQ.Series[0]["PieDrawingStyle"] = "SoftEdge";
            //背景色设置
            ChartQ.ChartAreas["ChartArea1"].ShadowColor = Color.Transparent;
            ChartQ.ChartAreas["ChartArea1"].BackColor = Color.FromArgb(209, 237, 254);         //该处设置为了由天蓝到白色的逐渐变化
            ChartQ.ChartAreas["ChartArea1"].BackGradientStyle = GradientStyle.TopBottom;
            ChartQ.ChartAreas["ChartArea1"].BackSecondaryColor = Color.White;
        }
        else 
        {
            ChartQ.Visible = false;
        }

    }

上图:

版权声明:本文为博主原创文章,未经博主允许不得转载。 举报

相关文章推荐

Ext.net Chart 使用心得(一)

软件说明   使用Ext.net控件 2.4 版本 .下载地址:http://www.ext.net/ 或者 在 VS 中使用 Nuget进行安装  示例效果图:http://examples.ext...

EXT.NET与Echart结合

" %>         测试页                 var LoadPicture = function () {           ...

程序员升职加薪指南!还缺一个“证”!

CSDN出品,立即查看!

Ext.net chart应用

" %>         P_Test2             .Panel_Title {             position: relative;           ...

[Ext.Net]1.X _德仔铁观音学习笔记整理

1 .配置及简单布局 2.常用组件介绍      2.1 Dropdownlist结合TreePanel (checkbox)      2.2 模拟进度条      2.3 上传文件      2....

EXT.NET_X.Js.Call方法

我们对在前台触发一个客户端事件,来操作界面元素,已经很熟悉,但这属于静态脚本范畴。往往有些时候,我们还需要动态脚本,也就是说,脚本在执行过程中需要的变量,是从服务器端获得的,那么X.Js.Call方法的作用,就是将服务器端变量传给客户端脚本,并执行脚本。例子 &lt;%@ Page Lan...
  • wsql
  • wsql
  • 2011-07-21 15:40
  • 644

Ext.Net_1.X_WINDOW遮罩层被GridPanel挡住

通过调试HTML代码,发现其实是DIV. chrome 中修改DIV Z:INDEX 就不被遮住了?但是又晓得如何修改window的Z:INDEX.那就修改"背景“GP的吧。

一步一步使用Ext JS MVC与Asp.Net MVC 3开发简单的CMS后台管理系统之用户管理(1)

应用程序的基本框架已经搭建好了,现在要做的是完成一个个的功能模块。先从简单做起,完成用户管理模块,该模块主要功能是使用一个Grid显示用户信息,并使用RowEditing进行用户的编辑、添加操作。Grid的分页则在Grid顶部使用分页工具条实现,在工具条上还要添加3个按钮用来添加用户、删除用户和为用...
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)