Hi everybody,
I am using WorldHigh.md map to display country outlines on my chart. Is there a way to change country border colors at runtime?
Thanks in advance!
Change map border color
Moderator: Queue Moderators
-
- Posts: 558
- Joined: Mon Mar 14, 2016 9:22 am
Re: Change map border color
For Regional map item you could find BorderLineStyle property (including Color and Width sub-properties). But for that property to be taken into account your Land/region layer's BorderDrawStyle property should be set as 'Individual'.
You can find and experiment with those properties in our Demo (https://lightningchart.com/net-charts/d ... nningDemo/)
With those changes you can change border for each country in real-time as long as you have access to map-item.
For example,
Hope this helps. If you need more technical support, then contact us (https://lightningchart.com/net-charts/d ... d/support/)
You can find and experiment with those properties in our Demo (https://lightningchart.com/net-charts/d ... nningDemo/)
With those changes you can change border for each country in real-time as long as you have access to map-item.
For example,
Code: Select all
MapLayer[] layers = _chart.ViewXY.Maps.Layers;
int length = layers.Length;
MapLayer layer = null;
for (int i = 0; i < length; i++)
{
layer = layers[i];
if (layer.Type == MapLayer.LayerType.Land)
{
(layer as RegionLayer).BorderDrawStyle = Map.DrawStyle.Individual;
}
}
// AND
MapItem mapItem = e.MapItem;
((Region)mapItem).BorderLineStyle.Color = Colors.Red;