About the data size of AddArray function

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
elmec
Advanced
Posts: 129
Joined: Mon Aug 26, 2013 12:00 am

About the data size of AddArray function

Post by elmec » Sun Jan 05, 2014 3:38 am

According to the description of AddArray function,
the second parameter means the data number of the first parameter?
But actrually it is the data number - 1 ?
So if I have a array of 10 elements,
I should add data like below?

Code: Select all

	double array[10] = {1, 2,3,4,5,6,7,8,9,10};
	Series1->AddArray(array, 9);

Yeray
Site Admin
Site Admin
Posts: 9552
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: About the data size of AddArray function

Post by Yeray » Tue Jan 07, 2014 3:47 pm

Hello,

No, the two AddArray overrides are:

Code: Select all

{ Adds the Values array parameter into the series. }
Function TChartSeries.AddArray(Const Values:Array of TChartValue):Integer;

{ Adds the XValues and YValues arrays parameter into the series. }
Function TChartSeries.AddArray(Const XValues, YValues:Array of TChartValue):Integer;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

elmec
Advanced
Posts: 129
Joined: Mon Aug 26, 2013 12:00 am

Re: About the data size of AddArray function

Post by elmec » Wed Jan 08, 2014 12:38 am

Then, what is the below one in FMXTee.Engine.hpp?

Code: Select all

int __fastcall AddArray(double const *Values, const int Values_Size)/* overload */;

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

Re: About the data size of AddArray function

Post by Narcís » Thu Jan 09, 2014 9:38 am

Hi elmec,

I could reproduce it with both VCL and Firemonkey C++ Builder projects. It looks like a C++ Builder bug to me. So I have added it (ID531) to the bug list to be fixed.
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

elmec
Advanced
Posts: 129
Joined: Mon Aug 26, 2013 12:00 am

Re: About the data size of AddArray function

Post by elmec » Thu Jan 09, 2014 9:51 am

So what should I do ?

Just pass the (data size - 1) instead of the data size ?
Is there any side effect?

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

Re: About the data size of AddArray function

Post by Narcís » Thu Jan 09, 2014 12:34 pm

Hi elmec,
elmec wrote:Just pass the (data size - 1) instead of the data size ?
Yes, that seems to be the way it works for now.
elmec wrote:Is there any side effect?
Not that I can think of right now.
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