Page 1 of 1

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

Posted: Tue Jul 19, 2005 1:13 pm
by 8120345
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 ..

Posted: Wed Jul 20, 2005 10:29 am
by narcis
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.

Posted: Wed Jul 20, 2005 2:43 pm
by 8120345
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)

Posted: Thu Jul 21, 2005 10:08 am
by narcis
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.

Posted: Mon Jul 25, 2005 10:53 am
by 8120345
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

Posted: Tue Jul 26, 2005 10:01 am
by narcis
Hi glikoz,

Thank you for bringing this to our attention. We will study the matter more closely for a future maintenance release.