Question of TMapSeries Control

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Calou
Advanced
Posts: 104
Joined: Wed Nov 19, 2008 12:00 am

Question of TMapSeries Control

Post by Calou » Thu Apr 23, 2009 12:09 pm

Hi all
I want to know if we can modifier in the TMapSeries the map added with the map by default, in fact, what i need is a french map, but i had a error when i tied to delete all the other maps but the France, the control was correctly show in the visual editor, but it shows Luxembourg and Australia instead of France at execution. The another question is if the background of chart can also zooming with the events of mouse, or replace a shape file with a image is possible or not?

Thank you
Regards

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

Post by Yeray » Thu Apr 23, 2009 1:42 pm

Hi Calou,

1. Yes, you could load an europe map and delete the polygons with label different to "France":

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
  Series1: TWorldSeries;
begin
  Series1 := TWorldSeries.Create(self);
  Chart1.AddSeries(Series1);

  Series1.Map := TWorldMap(6);

  for i:=Series1.Count-1 downto 0 do
  begin
    if Series1.Labels[i] <> 'France' then
      Series1[i].Destroy;
  end;
end;
2. The easiest way to do this would be using Image Tool and assigning the series to the tool. Then the chart and the image should zoom together.
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

Calou
Advanced
Posts: 104
Joined: Wed Nov 19, 2008 12:00 am

Post by Calou » Thu Apr 23, 2009 2:57 pm

That works

Thx :)

Post Reply