Map, coloring poligons

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Hermes
Newbie
Newbie
Posts: 54
Joined: Tue Feb 04, 2003 5:00 am
Location: Montevideo, Uruguay

Map, coloring poligons

Post by Hermes » Fri Apr 27, 2007 9:08 pm

Hi, I'm using the map series and have three situations:
1.- Color each poligon with different random colors: this works with ColorEach=true
2.- Color with a range: this works with UseRangeColor = true and setting StartColor and EndColor
3.- Color each poligon with a determined color: I´ve tried with ((Map)mMapa.Chart.Series[0]).Shapes[vPoligono].Color = System.Drawing.Color.FromArgb(vColor) but this not works
Any clue about point three?
Thank you

Edu
Advanced
Posts: 206
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Post by Edu » Mon Apr 30, 2007 9:52 am

Hi Hermes

You should accede to each poligon color and change it, as below code, also you should repaint the Chart, using the Invalidate() method:

Code: Select all

map1.Colors[0] = System.Drawing.Color.FromArgb(200, Color.Tomato);
            map1.Invalidate();
Best Regards,
Edu

Steema Support Central
http://support.steema.com/

Post Reply