有对 DundasWinChart 空间有研究的同志在吗?? 进来指点我下 谢谢!!
有对 DundasWinChart 空间有研究的同志在吗?? 进来指点我下 谢谢!!最好可以QQ聊下!!
我QQ:258346643 --------------------编程问答-------------------- 公司在用这个,但是没觉得有什么难度,所以建议你静下心看看文档和范例,基本上就无师自通了。 --------------------编程问答-------------------- AxisLabelAlignment(彩色立体统计柱形)
<%@ Page Language="C#" Description="dotnetCHARTING Component" %>
<%@ Register TagPrefix="dotnet" Namespace="dotnetCHARTING" Assembly="dotnetCHARTING"%>
<%@ Import Namespace="System.Drawing" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>.netCHARTING Sample</title>
<script runat="server">
void Page_Load(Object sender,EventArgs e)
{
Chart.Type = ChartType.Combo;
Chart.TempDirectory = "temp";
Chart.Debug = true;
Chart.Use3D = true;
Chart.Title = "Axis label alignment options.";
// This sample will demonstrate how axis labels are aligned.
// 1. SPECIFY LABEL ALIGNMENT
Chart.XAxis.Label.Alignment = StringAlignment.Far;
Chart.YAxis.Label.Alignment = StringAlignment.Near;
// Add some label text.
Chart.XAxis.Label.Text = "X axis (alignment: far)";
Chart.YAxis.Label.Text = "Y axis (alignment: near)";
// 2. ADD DATA
// *DYNAMIC DATA NOTE*
// This sample uses random data to populate the chart. To populate
// a chart with database data see the following resources:
// - Classic samples folder
// - Help File > Data Tutorials
// - Sample: features/DataEngine.aspx
Chart.SeriesCollection.Add(getRandomData());
}
SeriesCollection getRandomData()
{
SeriesCollection SC = new SeriesCollection();
Random myR = new Random();
for(int a = 0; a < 4; a++)
{
Series s = new Series();
s.Name = "Series " + a;
for(int b = 0; b < 4; b++)
{
Element e = new Element();
e.Name = "Element " + b;
//e.YValue = -25 + myR.Next(50);
e.YValue = myR.Next(50);
s.Elements.Add(e);
}
SC.Add(s);
}
// Set Different Colors for our Series
SC[0].DefaultElement.Color = Color.FromArgb(49,255,49);
SC[1].DefaultElement.Color = Color.FromArgb(255,255,0);
SC[2].DefaultElement.Color = Color.FromArgb(255,99,49);
SC[3].DefaultElement.Color = Color.FromArgb(0,156,255);
return SC;
}
</script>
</head>
<body>
<div style="text-align:center">
<dotnet:Chart id="Chart" runat="server" Width="568px" Height="344px">
</dotnet:Chart>
</div>
</body>
</html>
--------------------编程问答-------------------- RunningSum(曲线型)
<%@ Page Language="C#" debug="true" Description="dotnetCHARTING Component"%>
<%@ Register TagPrefix="dotnet" Namespace="dotnetCHARTING" Assembly="dotnetCHARTING"%>
<%@ Import Namespace="System.Drawing" %>
<script runat="server">
void Page_Load(Object sender,EventArgs e)
{
//set global properties
Chart.Title="Sales for March 11,2002";
Chart.ChartArea.XAxis.Label.Text="Hours";
Chart.LegendBox.Template="%icon %name";
Chart.ShowDateInTitle=false;
Chart.TempDirectory="temp";
Chart.Debug=true;
Chart.ChartArea.XAxis.FormatString = "h tt";
Chart.DefaultSeries.ConnectionString = ConfigurationSettings.AppSettings["DNCConnectionString"];
Chart.DefaultSeries.StartDate=new System.DateTime(2002,3,11,0,0,0);
Chart.DefaultSeries.EndDate = new System.DateTime(2002,3,11,23,59,59);
//Add a series
Chart.Series.Name="Items";
Chart.Series.SqlStatement= @"SELECT OrderDate, Sum(Total) FROM Orders WHERE OrderDate >= #STARTDATE# AND OrderDate <= #ENDDATE# GROUP BY Orders.OrderDate ORDER BY Orders.OrderDate";
Chart.Series.Visible=false;
Chart.SeriesCollection.Add();
//Add Sum series
Chart.Series.Name = "Total";
Chart.Series.DefaultElement.ShowValue=true;
Chart.Series.Type = SeriesType.Line;
Chart.SeriesCollection.Add(Calculation.RunningSum);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Running Sum</title>
</head>
<body>
<div style="text-align:center">
<dotnet:Chart id="Chart" runat="server"/>
</div>
</body>
</html>
--------------------编程问答-------------------- winform 大体相同,做些简单的图例应该很容易的。 --------------------编程问答-------------------- 谢谢了
补充:.NET技术 , C#