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 1.x_Ext.Net.Panel之列布局

我经常用到HTML中的表格,如果在EXT.NET 刚开始还真不知道怎么搞? 群里的APP CAI教我用PANEL 表示感谢! <ext:Window ID="Window1" runat="serve...

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

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

ext.net 1.x DEMO

  • 2013-07-18 16:50
  • 1.68MB
  • 下载

EXT.NET_X.Js.Call方法

我们对在前台触发一个客户端事件,来操作界面元素,已经很熟悉,但这属于静态脚本范畴。往往有些时候,我们还需要动态脚本,也就是说,脚本在执行过程中需要的变量,是从服务器端获得的,那么X.Js.Call方法...

EXT.NET_X.Js.Call方法

我们对在前台触发一个客户端事件,来操作界面元素,已经很熟悉,但这属于静态脚本范畴。往往有些时候,我们还需要动态脚本,也就是说,脚本在执行过程中需要的变量,是从服务器端获得的,那么X.Js.Call方法...

Ext.Net 1..0中的Group Command控件

前一阵尝试使用了一下这个Group控件,它分为好几种,我选择了其中一种带有Command的作为Demo写了一下,为了防止以后忘记在这里记录一下使用过程中的一些注意事项和问题。首先是前台代码:

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

使用Ext JS MVC与Asp.Net MVC 3开发简单的CMS后台管理系统之用户管理(1)     应用程序的基本框架已经搭建好了,现在要做的是完成一个个的功能模块。先从简单做起,...

Ext.NET学习笔记之1(环境搭建)

Ext.NET学习笔记之1(环境搭建) 1       Ext.NET简介 Ext.Net由起初的Coolite发展而来,Ext.Net是一个开源的ASP.NET(WebForm+MVC)组件...

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

应用程序的基本框架已经搭建好了,现在要做的是完成一个个的功能模块。先从简单做起,完成用户管理模块,该模块主要功能是使用一个Grid显示用户信息,并使用RowEditing进行用户的编辑、添加操作。Gr...

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

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

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