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.
Our own custom series class and 3D style problems
Hi.
Is this the complete source for custom series ? You're actually using "normal" pie series with customized series editor ?
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
http://www.steema.com
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.
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.
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.
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
http://www.steema.com