TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
-
JanDillen
- Newbie
- Posts: 2
- Joined: Fri Jun 02, 2023 12:00 am
Post
by JanDillen » Sat Nov 04, 2023 5:35 am
Here is a simple sample program:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
with Chart1.AddSeries(TMapSeries) as TMapSeries do begin
with Shapes.Add do begin
AddXY(0,0);
AddXY(3,3);
AddXY(2,5);
end; // Add points
end; // Create map
with Chart1 do begin
TMapSeries(Series[0]).Shapes[0].Color := clBlue;
TMapSeries(Series[0]).Shapes[0].Pen.Color := clRed;
TMapSeries(Series[0]).Shapes[0].Pen.Width := 10;
TMapSeries(Series[0]).Shapes[0].Brush.Style := bsCross;
end; // Change triangle properties
end;
I get a solid blue triangle with a tin black boundary, Changing pen or brush properties have no effect. I use the explicit "TMapSeries(Series[0]).Shapes[0]" to ensure that the correct Pen and Brush are modified.
I am using TeeChart Pro v2023.37.230130 32bit VCL
Any suggestions?
-
Yeray
- Site Admin
- Posts: 9613
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Mon Nov 06, 2023 7:14 am
Hello,
JanDillen wrote: ↑Sat Nov 04, 2023 5:35 am
Any suggestions?
Yes, add these two lines:
Code: Select all
TMapSeries(Series[0]).Shapes[0].ParentPen := False;
TMapSeries(Series[0]).Shapes[0].ParentBrush := False;
-
JanDillen
- Newbie
- Posts: 2
- Joined: Fri Jun 02, 2023 12:00 am
Post
by JanDillen » Mon Nov 06, 2023 12:37 pm
Thank you.