Page 1 of 1

TMapSeries Brush & Pen Issues

Posted: Sat Nov 04, 2023 5:35 am
by 16595959
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?

Re: TMapSeries Brush & Pen Issues

Posted: Mon Nov 06, 2023 7:14 am
by yeray
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;

Re: TMapSeries Brush & Pen Issues

Posted: Mon Nov 06, 2023 12:37 pm
by 16595959
Thank you.