Creating aSubchart that is a descendant of TDBChart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
IanF
Newbie
Newbie
Posts: 20
Joined: Tue Jul 04, 2017 12:00 am

Creating aSubchart that is a descendant of TDBChart

Post by IanF » Wed May 16, 2018 1:33 am

Is There any way of creating a Subchart that is a descendant of TDBChart rather Than TChart as we Have a lot of specialised Code that Requires a TDBChart

The subChart.addchart appears to only return a TChart
I would Like a TDBChart result
any sugestions greatly appreciated

regards

Yeray
Site Admin
Site Admin
Posts: 8971
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Creating aSubchart that is a descendant of TDBChart

Post by Yeray » Wed May 16, 2018 11:58 am

Hello,

I've created a TDBChart at runtime assigning the main Chart as Parent and redrawing it at the parent's OnAfterDraw event as done with the SubChartTool, and it seems to work fine:
DBSubChart.zip
(83.38 KiB) Downloaded 367 times
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

IanF
Newbie
Newbie
Posts: 20
Joined: Tue Jul 04, 2017 12:00 am

Re: Creating aSubchart that is a descendant of TDBChart

Post by IanF » Wed May 16, 2018 11:16 pm

UnfortunatelY get Compile Error for Project

Unsing D 10 Berlin win 32

[dcc32 Error] TeCanvas.pas(5692): E2010 Incompatible types: 'VCLTee.TeCanvas.TTeeCanvas' and 'TeCanvas.TTeeCanvas'
[dcc32 Error] TeCanvas.pas(8496): E2010 Incompatible types: 'TTeeCanvas' and 'TTeeCanvas3D'
[dcc32 Fatal Error] TeeGDIPlus.pas(610): F2063 Could not compile used unit 'TeCanvas.pas'

Noticed tis error with another example

Compiler goes to Here

Procedure TTeeCanvas.TextOut(const X,Y:TCoordinate; const Text:String; AllowHtml:Boolean);
begin
if AllowHtml then
HtmlTextOut(Self,{$IFDEF FMX}Round{$ENDIF}(X),{$IFDEF FMX}Round{$ENDIF}(Y),Text)
else
TextOut(X,Y,Text);
end;

Yeray
Site Admin
Site Admin
Posts: 8971
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Creating aSubchart that is a descendant of TDBChart

Post by Yeray » Thu May 17, 2018 6:38 am

Hello,

Please check the paths and the prefix.
- Paths: Using the source code version, you could use references to the sources in the "Library Path":
$(TeeChartInstall)\Source\VCL;$(TeeChartInstall)\Source\FMX;

Note "TeeChartInstall" is an "Environment Variable" pointing to the TeeChart installation, by default: "C:\Program Files (x86)\Steema Software\Steema TeeChart Pro VCL FMX Source Code 2018.24"

- Prefixes: Since XE4, you should add "VCLTee" prefix to the "unit scope names" in VCL projects and "FMXTee" prefix in FMX projects.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply