Our own custom series class and 3D style problems

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
PM
Newbie
Newbie
Posts: 5
Joined: Mon Sep 25, 2006 12:00 am

Our own custom series class and 3D style problems

Post by PM » Fri Dec 01, 2006 2:31 pm

I derive my own series classes from some standard Teechart series classes (such as TBarSeries, TLineSeries, and TPieSeries), and register them, using the RegisterTeeSeries procedure. The classes appear fine in the Gallery, and series are created OK.

The one problem I have is that when I create (using the Chart Editor) a series of my onw class, ticking the 3D checkbox at the bottom of the gallery, the series is not really renderd 3D in the chart (althouth the chart itself is 3D). Since my series is a descendent of, say, TPieChart, I would expect it to be 3D-compatible, just like its base class. But do I actually have to do something else to support this functionality?

Below is the source code of one of our custom series classes:

-------------------------------------------------------------

unit uCOMMON_GroupPieSeries;

interface

Uses
Classes, SysUtils,
Chart, Series, TeEngine, TeCanvas;

Type
TSummaryPieSeries = class(TPieSeries)
Public
Class Function GetEditorClass : String; Override;
End;


implementation

uses
TeeProcs, Math,

uCOMMON_SurgeryStatsSourceEditorForm;

Var
Description : AnsiString;
GalleryPage : AnsiString;

Class Function TSummaryPieSeries.GetEditorClass : String;
Begin
Result := SurgeryStatsSourceEditorClass;
End;

initialization

Description := 'Summary Pie';
GalleryPage := 'Summary';

RegisterTeeSeries( TSummaryPieSeries, @Description, @GalleryPage, 1);


end.

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

Post by Marjan » Mon Dec 04, 2006 7:10 am

Hi.

Is this the complete source for custom series ? You're actually using "normal" pie series with customized series editor ?
Marjan Slatinek,
http://www.steema.com

PM
Newbie
Newbie
Posts: 5
Joined: Mon Sep 25, 2006 12:00 am

Post by PM » Mon Dec 04, 2006 9:45 am

Yes. This is currently the full source. What I need is:

1. Attach a custom editor.
2. Make these series types appear as separate types in the Gallery, so the users know what they are selecting.

Both of these things work fine, and incomplete 3D rendering is the only problem.

BTW, we have similar custom series classes, derived from TBarSeries, TLineSeries, and THorizBarSeries. All have the same problem.

PM
Newbie
Newbie
Posts: 5
Joined: Mon Sep 25, 2006 12:00 am

Post by PM » Wed Dec 06, 2006 9:53 am

So how about some help and advice?

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

Post by Marjan » Wed Dec 06, 2006 10:46 am

Hi.

I've tried your exact code with the TeeChart v7.08 and it worked just fine i.e. unchecking/checking the "3D" checkbox switched between 2d and 3d pie. Which TeeChart version are you using ? Do you try to add series at design time or at runtime ? If first, then perhaps you should remove/rebuild your custom series package.
Marjan Slatinek,
http://www.steema.com

PM
Newbie
Newbie
Posts: 5
Joined: Mon Sep 25, 2006 12:00 am

Post by PM » Wed Dec 06, 2006 12:09 pm

Our version is 7.07 (VCL, used with Delphi 7).

The gallery allows to select a 3D style for the bar series, but it is not really shown 3D in the chart (even though the chart itself shows as 3D)

PM
Newbie
Newbie
Posts: 5
Joined: Mon Sep 25, 2006 12:00 am

Post by PM » Thu Dec 07, 2006 12:50 pm

Ok, we sorted that out - it's that somehow Depth on those series was set to 0 .

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

Post by Marjan » Fri Dec 08, 2006 10:12 am

I'm glad it turned out ok.
Marjan Slatinek,
http://www.steema.com

Post Reply