Marks not drawn with GDI+ in TeeChart 2015.15

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Collinor
Newbie
Newbie
Posts: 3
Joined: Fri Sep 19, 2014 12:00 am

Marks not drawn with GDI+ in TeeChart 2015.15

Post by Collinor » Tue Jun 02, 2015 6:13 am

We use TeeChart 2015.15 and Delphi XE8. Marks are not drawn in the following setup, if GDI+ is turned on. If you turn off GDI+ the marks are drawn.
You can reproduce it by putting a TChart (name Chart1), a TTeeGDIPlus (name TeeGDIPlus1) and a TButton (name Button1) on a form, filling the form's OnCreate and and button's OnClick event handler and replacing the implementation by the following code:

Code: Select all

implementation

uses
  VCLTee.Series,
  VCLTee.TeCanvas;

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
var
  lxSeries,
  lxSumSeries : TBarSeries;
begin
  TeeGDIPlus1.TeePanel := Chart1;
  Button1.Caption := 'GDI+ on/off';

  lxSumSeries := TBarSeries.Create(Self);
  lxSumSeries.Marks.Arrow.Visible := True;
  lxSumSeries.Marks.Callout.Brush.Color := clBlack;
  lxSumSeries.Marks.Callout.Arrow.Visible := True;
  lxSumSeries.Marks.Visible := True;
  lxSumSeries.ShowInLegend := False;
  lxSumSeries.Transparency := 100;
  lxSumSeries.Gradient.Direction := gdTopBottom;
  lxSumSeries.MultiBar := mbStacked;
  lxSumSeries.Shadow.Color := 8487297;
  lxSumSeries.XValues.Name := 'X';
  lxSumSeries.XValues.Order := loAscending;
  lxSumSeries.YValues.Name := 'Kreis';
  lxSumSeries.YValues.Order := loNone;
  lxSumSeries.BarWidthPercent  := 65;

  lxSumSeries.AddXY(Date, 1, '1');

  lxSeries := TBarSeries.Create(Self);
  lxSeries.Marks.Arrow.Visible         := True;
  lxSeries.Marks.Callout.Brush.Color   := clBlack;
  lxSeries.Marks.Callout.Arrow.Visible := True;
  lxSeries.Marks.Visible               := False;
  lxSeries.Title                       := 'Test 1';
  lxSeries.Gradient.Direction          := gdTopBottom;
  lxSeries.MultiBar                    := mbStacked;
  lxSeries.Shadow.Color                := 8947848;
  lxSeries.Shadow.HorizSize            := 0;
  lxSeries.BarWidthPercent             := 65;
  lxSeries.XValues.DateTime            := True;
  lxSeries.XValues.Name                := 'X';
  lxSeries.XValues.Order               := loAscending;
  lxSeries.YValues.Name                := 'Y';
  lxSeries.YValues.Order               := loNone;
  lxSeries.Color                       := clBlue;

  lxSeries.AddXY(Date, 40, FormatDateTime('mm/yy', Date));

  Chart1.AddSeries(lxSeries);

  Chart1.AddSeries(lxSumSeries);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  TeeGDIPlus1.Active := not TeeGDIPlus1.Active;
end;
Run the program and use the button to turn GDI+ on or off.

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

Re: Marks not drawn with GDI+ in TeeChart 2015.15

Post by Yeray » Tue Jun 02, 2015 2:05 pm

Hello,

The issue here is that GDI doesn't consider the Series transparency to draw the Marks while GDIPlus does.
I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1221

In GDIPlus, if you want the series to be transparent but not the marks, you can set:

Code: Select all

     Series1.Marks.UseSeriesTransparency:=false;
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