Delphi 10.1 Pro,带有嵌入式TeeChart的VCL。
我有一个75%透明的AreaSeries,我希望其标记是非透明,或者字体是非透明
我尝试了以下失败的尝试:
Marks[0].Transparent := false; // <- DOESN'T HELP
Marks[0].Transparency:= 0; // <- DOESN'T HELP
tAreaSeries及其标记创建如下:
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;
为演示起见,我两次调用上面的方法,一个是不透明的(0%),另一个是75%的透明性:
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;
感谢您的帮助。