TeeChart gradient in a DLL

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
LucaC
Newbie
Newbie
Posts: 14
Joined: Wed Feb 08, 2017 12:00 am
Contact:

TeeChart gradient in a DLL

Post by LucaC » Thu May 11, 2017 7:36 am

Hi,
I've some TChart into a Delphi dll.

I've made a porting of one of my dll modules that uses TeeChart. The version is 2016.19.

I've the same module running without problem in XE2 environment with TeeChart 2012.

How can i use gradient fill in new version of TChart/Delphi? Tha backgroung is always gray. Only Color property affect the background gradient don't work.

Thank you

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

Re: TeeChart gradient in a DLL

Post by Yeray » Thu May 11, 2017 10:24 am

Hello,

If I drop a TChart into a new Form and I put this code at OnCreate:

Code: Select all

  Chart1.Gradient.StartColor:=clWhite;
  Chart1.Gradient.EndColor:=clDkGray;
  Chart1.Gradient.MidColor:=clNone;

  Chart1.Walls.Back.Gradient.StartColor:=clDkGray;
  Chart1.Walls.Back.Gradient.EndColor:=clWhite;
I get this with the current TeeChart v2017.21:
Project1_2017-05-11_12-21-26.png
Project1_2017-05-11_12-21-26.png (5.96 KiB) Viewed 7263 times
So the gradients seem to work fine for me here with the latest version.
If you still find problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.
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

LucaC
Newbie
Newbie
Posts: 14
Joined: Wed Feb 08, 2017 12:00 am
Contact:

Re: TeeChart gradient in a DLL

Post by LucaC » Thu May 11, 2017 12:26 pm

Ok, also if I put the chart into a VCL Form Application all is Working correctly.

My problem is if I put the Chart on a Form that reside into a DLL.

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

Re: TeeChart gradient in a DLL

Post by Yeray » Fri May 12, 2017 7:51 am

Hello,

There may be some extra properties to set. Ie:

Code: Select all

  Chart1.Gradient.Visible:=True;

  Chart1.Walls.Back.Transparent:=False;
See the test project:
TeeChart_GDIPlus_exe_and_dll_gradients.zip
(57.66 KiB) Downloaded 577 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

Post Reply