Hello together,
I've a problem with the DownSampling Function. When I use it with a Steema.TeeChart.Styles.Points object as DataSource all is working well. But when I change the DataSource to a Steema.TeeChart.Data.TextSource object the DownSampling function does not work.
Any ideas?
Problem with DownSampling and TextSource
-
- Newbie
- Posts: 1
- Joined: Wed May 23, 2007 12:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Raimund,
No, you need to use a series for the TextSource and another series for the function. Then you can hide source series, for example:
No, you need to use a series for the TextSource and another series for the function. Then you can hide source series, for example:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Steema.TeeChart.Styles.Points points1 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
points1.Pointer.HorizSize = 1;
points1.Pointer.VertSize = 1;
Steema.TeeChart.Functions.DownSampling downSampling1 = new Steema.TeeChart.Functions.DownSampling(tChart1.Chart);
downSampling1.Method = Steema.TeeChart.Functions.DownSamplingMethod.Average;
downSampling1.Tolerance = 10.0;
Steema.TeeChart.Styles.FastLine fastLine1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
fastLine1.Function = downSampling1;
fastLine1.DataSource = points1;
Steema.TeeChart.Data.TextSource ts = new Steema.TeeChart.Data.TextSource();
try
{
Cursor = Cursors.WaitCursor;
ts.HeaderLines = 0;
ts.Separator = ';';
ts.Series = points1;
ts.Fields.Add(0, "X");
ts.Fields.Add(1, "Y");
ts.LoadFromFile(@"c:\temp\Book1.csv");
}
finally
{
Cursor = Cursors.Default;
}
fastLine1.CheckDataSource();
points1.Active = false;
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |