1

Delphi 10.1 Pro, VCL with embedded TeeChart.

I've a 75% transparent AreaSeries and I would like its Marks to be non transparent, or The font to be non transparent.

I tried the following without a success:

Marks[0].Transparent := false; // <- DOESN'T HELP
Marks[0].Transparency:= 0;     // <- DOESN'T HELP

The tAreaSeries and its Marks are created as follow:

procedure TForm2.AddAreaSeries(aMin, aMax, aSeriesTransparency: integer);
begin
  with Chart1.AddSeries(tAreaSeries) as tAreaSeries do
    begin
      AddXY(aMin, 10); // Two point AreaSeries
      AddXY(aMax, 10);
      SeriesColor  := clGreen;
      Transparency := aSeriesTransparency; // <- Series Transparency

      Marks[0].Color       := clRed;
      Marks[0].Transparent := false; // <- DOESN'T HELP
      Marks[0].Transparency:= 0;     // <- DOESN'T HELP

      Marks[0].Visible     := true;
      Marks[1].Visible     := true;
      Marks.Visible        := true; // Global Visibility for all Markers
    end;
end;

For demonstration, I called the above twice, one non transparent (0%) and the other with 75% transparency:

procedure TForm2.FormCreate(Sender: TObject);
begin
  Chart1.View3D := false;
  Chart1.Axes.Bottom.SetMinMax(0,10);

  // Adding two AreaSeries
  AddAreaSeries(1, 4, 0);  // Non transparent AreaSeries
  AddAreaSeries(6, 9, 75); // 75% transparent AreaSeries
end;

Here is the screen shot with comments on it: enter image description here

Thanks for any help.

Reron
  • 181
  • 11

1 Answers1

1

The Marks for a Series have an boolean option UseSeriesTransparency that you just need to set to false to set transparency independent of the series.

  Series2.Marks.UseSeriesTransparency := false; 

In the UI the option is a checkbox.

enter image description here

Brian
  • 6,717
  • 2
  • 23
  • 31
  • Thanks Brian, this is it. – Reron Oct 05 '18 at 16:11
  • Brian, the other question I had in this thread was for 75% transparent Marks background, but with non transparent Font. I tried to play with the Editor, but w/o success. Is it doable? – Reron Oct 06 '18 at 08:36