int[] xValue = new int[dt.Rows.Count];
int[] yValue = new int[dt.Rows.Count];
int i = 0 ;
foreach(DataRow dr in dt.Rows)
{
xValue[i] = Convert.ToInt32(dr["x"].ToString());
yValue[i] = Convert.ToInt32(dr["y"].ToString());
i++;
}
line1 = new Steema.TeeChart.Styles.Line();
line1.Add(xValue,yValue);
WebChart1.Chart.Series.Add(line1);
/////////////////////////////////////////////////
From: Narcís Calvet Steema Software
Subject: Re: Databound Series & Windows Mobile 5.
Date: Fri, 26 May 2006 13:31:40 +0200
Newsgroup: steema.public.teechart7.dotnet
Hi Ted,
In TeeChart.Pocket.dll, DataSource property is only for functions, to use
datasources with Pocket PC applications you can do something like this:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace PocketDataSource
{
public partial class Form1 : Form
{
private Steema.TeeChart.Pocket.TChart tChart1;
private Steema.TeeChart.Styles.Line line1;
private DataTable dt1;
private DataRow dr1;
public Form1()
{
InitializeComponent();
tChart1 = new Steema.TeeChart.Pocket.TChart();
line1 = new Steema.TeeChart.Styles.Line();
tChart1.Location = new System.Drawing.Point(8, 64);
tChart1.Series.Add(this.line1);
tChart1.Size = new System.Drawing.Size(224, 168);
Controls.Add(this.tChart1);
tChart1.Panel.Color = Color.Wheat;
tChart1.Header.Text = "TeeChart for SmartDevice";
//line1.FillSampleValues();
dt1 = new DataTable();
dt1.Columns.Add(new DataColumn("XValues",
System.Type.GetType("System.Double")));
dt1.Columns.Add(new DataColumn("YValues",
System.Type.GetType("System.Double")));
dt1.Columns.Add(new DataColumn("Labels",
System.Type.GetType("System.String")));
Random rnd1 = new Random();
for (int i = 0; i < 10; ++i)
{
dr1 = dt1.NewRow();
dr1["XValues"] = i;
dr1["YValues"] = rnd1.Next(100);
dr1["Labels"] = "Point " + i.ToString();
dt1.Rows.Add(dr1);
}
foreach (DataRow Val in dt1.Rows)
{
line1.Add((double)Val["XValues"], (double)Val["YValues"],
(string)Val["Labels"]);
}
}
}
}
--
Best Regards,
Narcís Calvet
Steema Support Central
http://support.steema.com
"Important note: If you are a TeeChart registered customer, please post your
support questions at Steema's Support monitored Forums for customers:
http://support.steema.com for a prompter reply."
Ted Malone wrote:
> Hi;
>
> I am currently evaluating TChart as a control that we'll use in both
> Winform and Mobile applications. My charting needs are very simple,
> but I want to be able to reuse the code as much as possible. I've
> created a Winform chart that consumes a Web Service and plots data
> appropriately (very nicely, I might add) in a line chart with 2
> series...
> However, the same code on the Mobile device never plots, even though
> the data is identical...
>
> Unfortunately I've found the samples for Mobile not too helpful when
> using data binding..
>
> Any thoughts? (Code snippet below, maybe I'm just doing something
> stupid)
> Thanks.
>
> Ted Malone
>
> Steema.TeeChart.Axis axis1 = tChart1.Axes.Bottom;
>
> axis1.Automatic = true;
>
> Steema.TeeChart.Axis axis2 = tChart1.Axes.Left;
>
> axis2.Automatic = false;
>
> axis2.Maximum = 100;
>
> axis2.Minimum = 0;
>
> axis2.Increment = 10;
>
>
> DataView dv = new
> DataView(cSICompliance.dsCompliance.Tables["ComplianceTrend"]);
>
> DataView dv2 = new
> DataView(cSICompliance.dsCompliance.Tables["ComplianceTrend"]);
>
> dv.RowFilter = "Template_Name = 'Antivirus Operations'";
>
> dv2.RowFilter = "Template_Name = 'Best Practices - Exchange'";
>
> line1.YValues.DataMember =
> dv.Table.Columns["PctCompliant"].ToString();
> line1.LabelMember = dv.Table.Columns["DateTimeString"].ToString();
>
> line1.DataSource = dv;
>
> line2.YValues.DataMember =
> dv2.Table.Columns["PctCompliant"].ToString();
> line2.LabelMember = dv2.Table.Columns["DateTimeString"].ToString();
>
> line2.DataSource = dv2;
//////////////////////////////////////////////////
WebChart wc=new WebChart();
wc.Visible=true;
Steema.TeeChart.Chart ch2=wc.Chart;
MemoryStream tmpChart2=new MemoryStream();
ch2.Header.Text="总分对比";
ch2.Header.Font.Bold=false;
ch2.Header.Font.Color=Color.Red;
ch2.Header.Font.Size=10;
//控制面板的背景色
ch2.Panel.Brush.Gradient.EndColor = System.Drawing.Color.FromArgb(0xFF,0xEE,0xF2);
ch2.Panel.Brush.Gradient.StartColor = System.Drawing.Color.FromArgb(0xFE,0xCB,0xD7);
ch2.Panel.Brush.Gradient.Visible = true;
ch2.Aspect.View3D = false;
//外观
ch2.Aspect.Elevation = 315;
ch2.Aspect.Orthogonal = false;
ch2.Aspect.Perspective = 0;
ch2.Aspect.Rotation = 360;
ch2.Invalidate();
//设置线条
Line AnalyLine2=new Line();
AnalyLine2.OutLine.Color = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(0)));
AnalyLine2.ColorEachLine=false;
AnalyLine2.OutLine.Visible = true;
AnalyLine2.Pointer.Visible = true;
AnalyLine2.ColorEach=false;
AnalyLine2.Brush.Color = System.Drawing.Color.Green;
for(int x=0;x<4;x++)
{
AnalyLine2.Add(x,"第"+Convert.ToString(x+1)+"次");
}
ch2.Series.Add(AnalyLine2);
ch2.Width=300;
ch2.Height=160;
ch2.Export.Image.PNG.Save(Server.MapPath(ComFunction.StatImgPath+"ScoreAnalyse"+j.ToString()+".png"));
tr=new TableRow();
TableCell tc=new TableCell();
tc.HorizontalAlign=HorizontalAlign.Center;
tc.Text="<img src=\""+ComFunction.StatImgPath+"ScoreAnalyse"+j.ToString()+".png\" border=0 width=300 height=160>";
tr.Cells.Add(tc);
tbStatImg.Rows.Add(tr);
/////////////////////////////////////////////////////////////
i don't want to display the tChart.
all i need to do is create an image file using tChart.
when i run the application a get this error:
"System.Runtime.InteropServices.COMException: Catastrophic failure"
this web application is on a server and the tCharts are formated using the
aspx.vb code behind pages.
Dim MyTable As New Data.DataTable("MyTable")
Dim ColValue As New Data.DataColumn("Value", Type.GetType("System.Int32"))
Dim ColDateTime As New Data.DataColumn("DateTime", Type.GetType("System.DateTime"))
MyTable.Columns.Add(ColValue)
MyTable.Columns.Add(ColDateTime)
Dim myChartRow As DataRow
Dim myChartAddRow As DataRow
For Each myChartRow In dstChartInfo.Tables("ChartInfo").Rows
myChartAddRow = MyTable.NewRow()
myChartAddRow("Value") = myChartRow("Value")
myChartAddRow("DateTime") = myChartRow("DateTime")
MyTable.Rows.Add(myChartAddRow)
Next
Dim FirstView As New Data.DataView(MyTable)
Dim tChart1 As New TChart()
tChart1.AddSeries(ESeriesClass.scLine)
With tChart1.Series(0)
.YValues.ValueSource = "Value"
.XValues.ValueSource = "DateTime"
.XValues.DateTime = True
.DataSource = FirstView
.CheckDataSource()
.VerticalAxis = EVerticalAxis.aLeftAxis
.Color = Convert.ToUInt32(System.Drawing.Color.Blue)
End With
With tChart1.Axis.Bottom
.Labels.DateTimeFormat = "dd/MM/yyyy HH:mm:ss"
.Labels.Multiline = True
.MinorTickLength = 2
.MinorTicks.Visible = True
.MinorTickCount = 4
.TickLength = 8
.Ticks.Visible = True
End With
With tChart1.Axis.Left
.GridPen.Color = Convert.ToUInt32(System.Drawing.Color.LightGray)
.GridCentered = True
.MinorTickLength = 2
.MinorTicks.Visible = True
.TickLength = 8
.Ticks.Visible = True
End With
With tChart1.Axis.Right
.GridPen.Color = Convert.ToUInt32(System.Drawing.Color.White)
.MinorTickLength = 2
.MinorTicks.Visible = True
.TickLength = 8
.Ticks.Visible = True
End With
With tChart1.Header
.Visible =
没有合适的资源?快使用搜索试试~ 我知道了~
统计控件,一个月份统计控件
共660个文件
cs:173个
resx:165个
ascx:155个
需积分: 9 5 下载量 110 浏览量
2011-06-28
09:17:33
上传
评论
收藏 14.57MB RAR 举报
温馨提示
能统计出,某年每个月份的统计,一目了然,很好用,直接仿照这些就行了,很强大
资源推荐
资源详情
资源评论
收起资源包目录
统计控件,一个月份统计控件 (660个子文件)
Global.asax 1KB
NTechnicalPriceIndicatorsUC.ascx 5KB
naxislabelsuc.ascx 5KB
NLegendGeneralUC.ascx 4KB
NNoCodeBehindUc.ascx 4KB
naxistitlesuc.ascx 4KB
NStackedBarUC.ascx 4KB
NStandardPolarUC.ascx 4KB
NStandardLineUC.ascx 4KB
NLinearScaleUC.ascx 3KB
NStandardBubbleUC.ascx 3KB
NEmptyDataPointsUC.ascx 3KB
NStandardLine2DUC.ascx 3KB
NVolumeIndicatorsUC.ascx 3KB
NCandleStockUC.ascx 3KB
NLabelsGeneralUC.ascx 3KB
NStandardAreaUC.ascx 3KB
NStandardShapeUC.ascx 3KB
NStandardHighLowUC.ascx 3KB
NStandard2DHighLowUC.ascx 3KB
NLegendPositionUC.ascx 3KB
NStandardPointUC.ascx 3KB
NFilledAreaPolarUC.ascx 3KB
NCustomClientSideScriptAndPostbackUC.ascx 3KB
NFilledAreaRadarUC.ascx 3KB
NConstLinesUC.ascx 3KB
naxismodelcrossinguc.ascx 3KB
NGridSurfaceUC.ascx 3KB
NStandardPieUC.ascx 3KB
NStandardArea2DUC.ascx 3KB
NAppearanceUC.ascx 3KB
NDateTimeStockUC.ascx 3KB
NXYScatterBubbleUC.ascx 3KB
NAxisStripesUC.ascx 3KB
naxisgridlinesuc.ascx 3KB
NStandardRadarUC.ascx 3KB
NMovingAveragesUC.ascx 3KB
NMeshGeneralUC.ascx 3KB
naxisticksuc.ascx 3KB
NStandardBar2DUC.ascx 3KB
NDateTimeScaleUC.ascx 3KB
NStandardBarUC.ascx 3KB
NMarkersUC.ascx 3KB
NSeriesLegendUC.ascx 3KB
NDataLabelsUC.ascx 3KB
naxisvaluecrossinguc.ascx 3KB
NStickStockUC.ascx 2KB
NWatermarksGeneralUC.ascx 2KB
NXYZErrorBarUC.ascx 2KB
NBindingToDataAdapterUC.ascx 2KB
naxisdockinguc.ascx 2KB
NStackedLineUC.ascx 2KB
NStandardFloatBarUC.ascx 2KB
NGroupedPieUC.ascx 2KB
NEvaluatingUC.ascx 2KB
NOverlappedLineUC.ascx 2KB
NGridFrameUC.ascx 2KB
NMeshIntersectedUC.ascx 2KB
NPriceIndicatorsUC.ascx 2KB
NXYErrorBarUC.ascx 2KB
NStandardSmoothLineUC.ascx 2KB
NStandardFunnel3DUC.ascx 2KB
NStandardFunnel2DUC.ascx 2KB
NDateTimeBoxAndWhiskers2DUC.ascx 2KB
NDirectionalMovementUC.ascx 2KB
NLabelsFormattedUC.ascx 2KB
NStandardFloatBar2DUC.ascx 2KB
NStackedAreaUC.ascx 2KB
NImageBordersUC.ascx 2KB
NAverageMinMaxUC.ascx 2KB
NBoxAndWhiskers2DUC.ascx 2KB
NFindingUC.ascx 2KB
NRangeIndicatorsUC.ascx 2KB
NStandardBordersUC.ascx 2KB
NPowerCumulativeExpAverageUC.ascx 2KB
NHorizontalBarUC.ascx 2KB
NClusterBarUC.ascx 2KB
NManhattanBarUC.ascx 2KB
NMeshFillEffectUC.ascx 2KB
naxissectionsuc.ascx 2KB
NOrdinalScaleUC.ascx 2KB
NYErrorBarUC.ascx 2KB
NHorizontalFloatBarUC.ascx 2KB
NLineStudiesUC.ascx 2KB
NLogarithmicScaleUC.ascx 2KB
NAdvancedFunnel3DUC.ascx 2KB
NCountStdDevRmsUC.ascx 2KB
NStandardStepLineUC.ascx 2KB
NAdvancedFunnel2DUC.ascx 2KB
NFilteringUC.ascx 2KB
NDateTimeSmoothAreaUC.ascx 2KB
NGridFillEffectUC.ascx 2KB
NPersistentServerControlUC.ascx 2KB
NSumElementsUC.ascx 2KB
NXYSmoothAreaUC.ascx 2KB
NSortingUC.ascx 1KB
NFinancialChartUC.ascx 1KB
NCustomScaleDecorationsUC.ascx 1KB
NExplodedPieUC.ascx 1KB
NMultiSeriesLineUC.ascx 1KB
共 660 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
mingjuan1314
- 粉丝: 41
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功