[DevExpress Support Team: CLONED FROM T836409: VectorMap - How to update element colors after updating colorGroupingField values]
Another question about repaint of the vectorMap. How to redraw the legend?
in the same example https://codepen.io/mylscompany/pen/PooMQZB?editors=0010 when i press the Change button, i change the colorGroup array, so i want to change the legend too. How to do it?
The legend labels should be re-rendered when the colorGroup is correctly updated. Take note that the layer option may have either a type of Array<Object> or Object as it was described in the layers documentation.
In this scenario, there is only one layer object, and not an array of layer objects. Hence, the legend labels can be updated using the code snippet below:
// vmap.option("layers.colorGroups", [0, 0.5, 0.8, 1, 2, 3, 150]); vmap.option("layers.colorGroups", [0, 0.5, 0.8, 1, 2, 3, 150]);
Let me know if this helps.