Page 1 of 1

Map, coloring poligons

Posted: Fri Apr 27, 2007 9:08 pm
by 6927799
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

Posted: Mon Apr 30, 2007 9:52 am
by 9348258
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();