Page 1 of 1

Series.Count == 0 ?

Posted: Thu Apr 15, 2004 5:00 am
by 8121155
Hello seniors,

I have a problem when I use the TeeChart and the WebChart to draw a "C" shape curve. Could you help me? :?:

I had drawn a "C" shape curve by "Line Series" or "Fast Line Series" correctly by the TeeChart and the WebChart (Old version). Recently, I installed the last version (1.1.1544.23908), but my curve is damaged at the same time. It seems to cause by the new feature, auto sorting. :(

For example, I want to draw a line from 1 to 2, 3, 4, 5, 6, 7 and 8 sequentially. Although the old chart works fine, the new version draw 4 to 3, 5, 2, 6, 1, 7 and 8. The new version is smart! But how can I draw what I want now? Could you tell me? :!:

What I want:
5-6-7
/ \
/ 8
4 1
\ /
3-2

What I get:
5 6 7
4 / \ / \ / \
V V V 8
3 2 1

By the way, I have tried to do use the "Point 3D Series" to draw what I want in WebChart. But I can't get any series by

Code: Select all

"this.WebChart1.Chart.Series[n]"
because the

Code: Select all

"this.WebChart1.Chart.Series.Count"
is always zero! The "Count" indicates that I have 14 "Line Series", "Fast Line Series" or "Points Series" primarily. But I get 0 after I add a "Point 3D Series". How does it happen? Is it a bug? Or I use them in wrong way? :?

Thanks for your help in advance! :)

Albert

My environment:
Windows Server 2003 Enterprise Edition Version 5.2 (Build 3790.srv03_rtm.030324-2048)
VS.net 2003 Version 7.1.3088
MS.net Framework Version 1.1.4322
TeeChart.net Version 1.1.1544.23908

Posted: Wed Apr 21, 2004 5:08 pm
by Pep
Hi Albert,

you should be able to draw what you want using the latest installer available from our web site and the following code :

Code: Select all

private void Form1_Load(object sender, System.EventArgs e)
{
line1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.None;
WebChart1.Chart.Series[0].Add (6,10,"",Color.Red);
WebChart1.Chart.Series[0].Add (5,15,"",Color.Red);
WebChart1.Chart.Series[0].Add (4,10,"",Color.Red);
WebChart1.Chart.Series[0].Add (3.5,5,"",Color.Red);
WebChart1.Chart.Series[0].Add (4,0,"",Color.Red);
WebChart1.Chart.Series[0].Add (5,-5,"",Color.Red);
WebChart1.Chart.Series[0].Add (6,0,"",Color.Red);
}
[quote]
is always zero! The "Count" indicates that I have 14 "Line Series", "Fast Line Series" or "Points Series" primarily. But I get 0 after I add a "Point 3D Series". How does it happen? Is it a bug? Or I use them in wrong way?
[quote]
I'm not sure what you refer. I've tried to use :
WebChart1.Chart.Series.Count();
and works fine here, could you please tell me how can I reproduce this problem ?

Posted: Thu May 27, 2004 9:41 am
by 8121155
Joseph,
Thank you! "line1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.None" is what I need exactly. I had finished my program by it smoothly! Thank you very much!

Whereas I can't upload my project files so I list the steps of how to repeat the small bug about "count=0" Hope this bug report will be useful for you.

1 Preparation:
  • 1.1 Open the "Microsoft Visual Studio .NET 2003"
    1.2 New a Visual C# Project by the template "ASP.NET Web Application".
    1.3 Drag a "WebChart" and a "label" to the "design page"
    1.4 Add the bellow code in the "WebForm1.aspx.cs"

Code: Select all

private void Page_Load(object sender, System.EventArgs e)
{
	this.Label1.Text = this.WebChart1.Chart.Series.Count.ToString();
}
2 Check the program:
  • 2.1 Right click the "WebChart1" in "design page" and chose the "Edit".
    2.2 Add 3 series (a "Line", a "Point" and a "Fast Line").
    2.3 Click "Ok" and "Close" to complete.
    2.4 Press F5 to compile and run this program.
    2.5 If the label is 3, the states of all controls and program are fine.
3 Repeat the bug:
  • 3.1 Right click the "WebChart1" in "design page" and chose the "Edit".
    3.2 Add a new series, "Point 3D".
    3.3 Click "Ok" and "Close" to complete.
    3.4 Press F5 to compile and run this program.
    3.5 The label is 0! Although there are four series in the "WebChart1", the "Series.Count" returns 0.

Posted: Thu May 27, 2004 5:56 pm
by Pep
Hi Albert,
Whereas I can't upload my project files so I list the steps of how to repeat the small bug about "count=0" Hope this bug report will be useful for you.
Yes, of course.. I'm able to reproduce it. And also I've added it on our defect list to be fixed for the next maintenance releases.
Thanks !