Page 1 of 1

TeeChart gradient in a DLL

Posted: Thu May 11, 2017 7:36 am
by 16580071
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

Re: TeeChart gradient in a DLL

Posted: Thu May 11, 2017 10:24 am
by yeray
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 7631 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.

Re: TeeChart gradient in a DLL

Posted: Thu May 11, 2017 12:26 pm
by 16580071
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.

Re: TeeChart gradient in a DLL

Posted: Fri May 12, 2017 7:51 am
by yeray
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 618 times