Page 1 of 1

Our own custom series class and 3D style problems

Posted: Fri Dec 01, 2006 2:31 pm
by 9347559
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.

Posted: Mon Dec 04, 2006 7:10 am
by Marjan
Hi.

Is this the complete source for custom series ? You're actually using "normal" pie series with customized series editor ?

Posted: Mon Dec 04, 2006 9:45 am
by 9347559
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.

Posted: Wed Dec 06, 2006 9:53 am
by 9347559
So how about some help and advice?

Posted: Wed Dec 06, 2006 10:46 am
by Marjan
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.

Posted: Wed Dec 06, 2006 12:09 pm
by 9347559
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)

Posted: Thu Dec 07, 2006 12:50 pm
by 9347559
Ok, we sorted that out - it's that somehow Depth on those series was set to 0 .

Posted: Fri Dec 08, 2006 10:12 am
by Marjan
I'm glad it turned out ok.