ASP.Net Chart Control -----Bar and Column Charts










StackedBar  StackedColumn StackedArea


<asp:CHART id="Chart1" runat="server" Height="296px" Width="412px" BackColor="#D3DFF0" Palette="BrightPastel"
BorderlineDashStyle="Solid" BackGradientStyle="TopBottom" BorderWidth="2" BorderColor="26, 59, 105">
<legends>
<asp:Legend TitleFont="Microsoft Sans Serif, 8pt, style=Bold" BackColor="Transparent" Font="Trebuchet M S, 8.25pt, style=Bold" IsTextAutoFit="False" Enabled="False" Name="Default"></asp:Legend>
</legends>
<borderskin SkinStyle="Emboss"></borderskin>
<series>
<asp:Series Name="Series1" ChartType="StackedArea100" BorderColor="180, 26, 59, 105" Color="220, 65, 14 0, 240"></asp:Series>
<asp:Series Name="Series2" ChartType="StackedArea100" BorderColor="180, 26, 59, 105" Color="220, 252, 1 80, 65"></asp:Series>
<asp:Series Name="Series3" ChartType="StackedArea100" BorderColor="180, 26, 59, 105" Color="220, 224, 6 4, 10"></asp:Series>
<asp:Series Name="Series4" ChartType="StackedArea100" BorderColor="180, 26, 59, 105" Color="220, 5, 100 , 146"></asp:Series>
</series>
<chartareas>
<asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="Transparent" BackColor="64, 165, 191, 228" ShadowColor="Transparent" BackGradientStyle="TopBottom">
<area3dstyle Rotation="10" Inclination="15" WallWidth="0" />
<position Y="3" Height="92" Width="92" X="2"></position>
<axisy LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8">
<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
<MajorGrid LineColor="64, 64, 64, 64" />
</axisy>
<axisx LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8">
<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
<MajorGrid LineColor="64, 64, 64, 64" />
</axisx>
</asp:ChartArea>
</chartareas>
</asp:CHART>


            // Populate series data
Random random = new Random();
for(int pointIndex = 0; pointIndex < 10; pointIndex++)
{
Chart1.Series["Series1"].Points.AddY(Math.Round((double)random.Next(45, 95),0));
Chart1.Series["Series2"].Points.AddY(Math.Round((double)random.Next(5, 75),0));
Chart1.Series["Series3"].Points.AddY(Math.Round((double)random.Next(5, 95),0));
Chart1.Series["Series4"].Points.AddY(Math.Round((double)random.Next(35, 95),0));
}

      string chartTypeName == "StackedArea"//"StackedArea100"//"StackedColumn"/"StackedColumn100"/"StackedBar"/"StackedBar100"
      

       Chart1.Series["Series1"].ChartType = (SeriesChartType)
Enum.Parse( typeof(SeriesChartType), chartTypeName, true
);
       Chart1.Series["Series2"].ChartType = (SeriesChartType)
Enum.Parse( typeof(SeriesChartType), chartTypeName, true
);
       Chart1.Series["Series3"].ChartType = (SeriesChartType)
Enum.Parse( typeof(SeriesChartType), chartTypeName, true
);
       Chart1.Series["Series4"].ChartType = (SeriesChartType)
Enum.Parse( typeof(SeriesChartType), chartTypeName, true );

 

时间: 2024-08-26 10:23:23

ASP.Net Chart Control -----Bar and Column Charts的相关文章

asp.net chart美化+绑定数据--饼图

asp.net chart之饼图 开发环境VS2010 chart控件是vs自带控件 前台: 1 <asp:Chart ID="Chart3" runat="server" Width="900px"> 2 <Legends> 3 <asp:Legend BackColor="Transparent" Alignment="Center" Font="Trebuche

解决 ASP.NET Chart 控件出错 为 ChartImg.axd 执行子请求时出错

    今天在做一个关于MVC的MSChart时,本以为很简单的一个东西,后面把数据什么的都绑定好后,满以为OK了,一运行就报错“ ASP.NET Chart 控件出错 为 ChartImg.axd 执行子请求时出错 ”,纠结~~后面网上搜了一下这方面的解决方案,然后结合自己的,最后做了一个小的总结: 一.在vs2008中,你需要按照如下的步骤进行配置: 1.<pages controlRenderingCompatibilityVersion="3.5" enableEvent

一款真正开源且功能强大的C#甘特图控件.NET Winforms Gantt Chart Control

甘特图在项目管理中非常重要,甘特图的思想比较简单,即以图示的方式通过活动列表和时间刻度形象地表示出任何特定项目的活动顺序与持续时间.它直观地表明任务计划在什么时候进行,及实际进展与计划要求的对比.管理者由此可便利地弄清一项任务(项目)还剩下哪些工作要做,并可评估工作进度.甘特图可以显示几个部门.机器或设备的运行和闲置情况.这表示了该系统的有关工作负荷状况,这样可使管理人员了解何种调整是恰当的. 由于项目需要,在网上找了很久,经过大量的对比和评估,发现一款真正开源且功能强大的C#甘特图控件.NET

Scene View Control Bar场景视图控制条

场景视图控制栏 场景视图控制栏允许您选择用于查看场景的各种选项,还可以控制是否启用照明和音频.这些控件仅在开发过程中影响场景视图,对构建的游戏没有影响. Scene View Control Bar 场景视图控制栏 第一个下拉框是选择绘图模式:你可以选择去查看整个场景纹理,线框架,或纹理与线框架覆盖.在游戏发布时,它不对你的游戏有影响. :场景中灯光打开与关闭 :切换天空球.雾效.光晕的显示与隐藏 :切换声音的开关 :单击三角符号可以显示或隐藏场景中用到的光源.声音.摄像机等对象的图标 :查找物

读者阿木询问使用 ASP.NET AJAX Control Toolkit 的网页是否一定要使用 UTF-8 编码

摘要:读者阿木询问使用 ASP.NET AJAX Control Toolkit 的网页是否一定要使用 UTF-8 编码 问题: 请问老师使用ASP.NET.AJAX.Control.ToolKit技术网页编码是不是一定要是utf-8 解答: 当您在 ASP.NET 网页中使用 AJAX Control Toolkit (于撰写此文时,最新版本为 2007 年 11 月 19 日所发行的 Version 1.0.11119.0)内建的 ToolkitScriptManager 控件来取代 AJA

ASP.NET AJAX Control Toolkit

https://ajaxcontroltoolkit.codeplex.com/ 警告 7 未能找到引用的组件“Antlr3.Runtime”. 警告 6 未能找到引用的组件“HtmlAgilityPack”. 警告 10 未能找到引用的组件“HtmlAgilityPack”. 警告 1 未能找到引用的组件“Moq”. 警告 3 未能找到引用的组件“nunit.core.interfaces”. 警告 2 未能找到引用的组件“nunit.core”. 警告 4 未能找到引用的组件“nunit.f

MS Chart Control 學習手記(二) - 圓餅圖

using System.Web.UI.DataVisualization.Charting; 02 using System.Drawing; 03   04 namespace Chart.AJAX 05 { 06     public partial class Export_AJAX : System.Web.UI.Page 07     { 08         void CreateChart() 09         { 10             string[] xValue

Asp.Net MVC Control向View传值

 1.通过View(Parameter)参数传值     Control: namespace MyMVCDemo.Controllers { public class PersonController : Controller { // // GET: /Person/ public ActionResult Index() { Person whiteperson = new Person(); whiteperson.Id = 1; whiteperson.Name = "James&qu

DevExpress v15.1:ASP.NET WebForms功能增强(一)

<下载最新版DevExpress ASP.NET Controls v15.1.5> ASP.NET Rich Text Editor Word? Inspired富文本编辑器 DevExpress ASP.NET Rich Text Editor预览版去年首次发布,此次版本更新正式发布了ASP.NET Rich Text Editor,它包括以下一些新功能: 编号和项目符号列表 支持域(包括DOCVARIABLE域) 隐藏符号 超链接 为插入符号.标签设置等新增对话框 支持工作流(打开/保存