ValueList.Count doesnt Match ValueList.Value.Length Why?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
glikoz
Newbie
Newbie
Posts: 34
Joined: Mon May 05, 2003 4:00 am

ValueList.Count doesnt Match ValueList.Value.Length Why?

Post by glikoz » Tue Jul 19, 2005 1:13 pm

I want to make Horizontal Shifting for "my derived functions" (indicators)
But when i try to access XValues.Value (its a double array) , i recognize that When XValues.Count is 50 XValues.Value.Length is 100 ..(First 50 elements of array full with value others equal 0 )


And another interesting thing: when i add my derived function to chart overridable AddPoints function runs four times (only one CheckDataSource and 50 datas )

Thx for advice ..

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jul 20, 2005 10:29 am

Hi glikoz,

Could you please send us a project you can run "as-is" where the TeeChart defects can clearly be seen?

You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

glikoz
Newbie
Newbie
Posts: 34
Joined: Mon May 05, 2003 4:00 am

Post by glikoz » Wed Jul 20, 2005 2:43 pm

You can easily make..

this.tChart1 = new Steema.TeeChart.TChart();
this.candle1 = new Steema.TeeChart.Styles.Candle();
this.tChart1.Cursor = System.Windows.Forms.Cursors.Default;
this.tChart1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tChart1.Location = new System.Drawing.Point(0, 0);
this.tChart1.Name = "tChart1";
this.tChart1.Series.Add(this.candle1);
this.tChart1.Size = new System.Drawing.Size(686, 371);
this.tChart1.TabIndex = 0;
this.tChart1.Click += new System.EventHandler(this.tChart1_Click);
this.candle1.CloseValues = this.candle1.YValues;
this.candle1.DateValues = this.candle1.XValues;
this.candle1.Style = Steema.TeeChart.Styles.CandleStyles.CandleBar;
this.candle1.Title = "candle1";


And then

tChart1.Series[0].FillSampleValues(50);
Put breakpoint after above line ...
Conceptually these two values couldnt different each other:

tChart1.Series[0].ValuesLists[0].Count
tChart1.Series[0].ValuesLists[0].Value.Length

But one of them 50 another 101

Is there a bug ? Thx.. (Development Environment- VS.NET 2005 Beta 2 + TeeChart2 Beta)

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jul 21, 2005 10:08 am

Hi glikoz,

Is there any reason for what you can't use Count instead of Length? If so, could you please send us an example project we can run "as-is" to reproduce the problem here?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

glikoz
Newbie
Newbie
Posts: 34
Joined: Mon May 05, 2003 4:00 am

Post by glikoz » Mon Jul 25, 2005 10:53 am

Im trying to make a technical analysis application ..
I use two 3th party component for this one of them teechart , another is
a one of indicator calculation library...This library take double array to calculate indicator's point(its double array too).

And for this i sent MySeries.ValuesList.Value (its a double array)
But because of length problem calculation throws errors.

So my temprorary solution for this situation:

tChart1.Series[0].FillSampleValues(50);

tChart1.Series[0].ValuesLists[0].Value=MyUtilityLibrary.CutBArray(tChart1.Series[0].ValuesLists[0].Value, 50);
tChart1.Series[0].ValuesLists[1].Value=MyUtilityLibrary.CutBArray(tChart1.Series[0].ValuesLists[1].Value, 50);
tChart1.Series[0].ValuesLists[2].Value=MyUtilityLibrary.CutBArray(tChart1.Series[0].ValuesLists[2].Value, 50);
tChart1.Series[0].ValuesLists[3].Value=MyUtilityLibrary.CutBArray(tChart1.Series[0].ValuesLists[3].Value, 50);
tChart1.Series[0].ValuesLists[4].Value = MyUtilityLibrary.CutBArray(tChart1.Series[0].ValuesLists[4].Value, 50);


CutBArray --> My special utility method :It returns beginner of double[] array

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Jul 26, 2005 10:01 am

Hi glikoz,

Thank you for bringing this to our attention. We will study the matter more closely for a future maintenance release.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply