Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Teechart's Properties

edited September 2001 in General
In the Calc Page using the RAP, How can I access the teechart Properties.

I would like to access the properties: SeriesList[n] or Series.

eg.:

Coomand :
Teechart1.SeriesList[0]. ... 'Properties'
Returns The Message on compilation
Expected: '(' or '[', but found 'SeriesList' instead.

or

Coomand :
Teechart1.Series1. ... 'Properties'
Returns Too
Expected: '(' or '[', but found 'Series1' instead.



Note : I've already tried replace the teechart only to Chart.

Especifications
Delphi 5
RB 5.5
Teechart 4.02

Comments

  • edited September 2001
    You will need to do two things:

    Expose the .Series[] property using your own RTTI class (and any
    other unpublished properties and methods you need). See the RAP
    help 'extending RAP - adding classes and properties via RAP' for
    an excellent tutorial. Also look at the tech-tips, RAP demos
    myRAPfuncs...pas (under RBuilder\Demos\RAP), and RB source code
    eg ppRTTI.pas). The .Series[] property is an access specifier and
    requires a little more coding than normal properties but this is
    covered in the tech tips. I use TCustomChart as the
    RTTI.RefClass. You will also need to expose unpublished
    TChartSeries properties like .RefreshSeries, .Clear etc using
    TChartSeries as the RTTI.RefClass.

    To access the series use:
    DPTeeChart1.Chart.Series[i].RefreshSeries;
    DPTeeChart1.Chart.Series[i].Clear;
    etc

This discussion has been closed.