A Question About Data Insert in Series

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
hexfhhu
Newbie
Newbie
Posts: 21
Joined: Thu Dec 07, 2006 12:00 am

A Question About Data Insert in Series

Post by hexfhhu » Sat Dec 23, 2006 2:42 am

I insert several series (TSurfaceSeries) in the Chart1(TChart of Delphi 7.0, TeeChart7.07), when I input the code as:
chart1.series[0].addxyz(0,1,0);
chart1.series[1].addxyz(0,2,0);
the data cann’t be accepted ,and the error notice is “ undeclared identifier: ‘addxyz’ ” .
the data can be accepted with follow code :
series1.addxyz(0,1,0);
series2.addxyz(0,2,0);
But if I want to do a cycle for all of the series, should I do it one by one? Thank you!

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Sat Dec 23, 2006 11:07 am

Hi.

tChart.Series is defined as TChartSeries and it doesn't introduce AddXYZ method. To make it work, you'll have to typecast TChartSeries to TSurfaceSeries (of course, if possible). Something like this:

Code: Select all

if (tChart.Series[0] is TSurfaceSeries) then
with (tChart.Series[0] as TSurfaceSeries) do
begin
  AddXYZ(...);
end;
Marjan Slatinek,
http://www.steema.com

Post Reply