Our own custom series class and 3D style problems
Posted: 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.
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.