[Bug] Multiple map series and visualMap objects not mapping as expected
- Dominant language
- TypeScript
- Stars
- 67.3k
- Forks
- 19.8k
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 8
Description
### Version
5.5.1
### Link to Minimal Reproduction
https://codepen.io/amcveyCW/pen/OPLbpbd
### Steps to Reproduce
1. Add at least two `series` objects. Each should be of `type` 'map,' reference some map SVG, and include their own data array relating to the referenced map.
2. Create a matching number of `visualMap` objects, either 'piecewise' or 'continuous' `type`. Set up some unique min/max/color/etc for each object. Each should include `seriesIndex` and the value should reference one of the corresponding `series` object created in the above step.
3. Include `legend` for testing purposes.
4. Note that the first `visualMap` object's `seriesIndex` is not respected and it controls both map series. By comparison, the following `visualMap` objects behave correctly and their `seriesIndex` is respected. This is visible when the first map (A) is deselected from the legend.
### Current Behavior
The first `visualMap` object thresholds and colors are applied to all series objects. If `type` 'continuous' - the following `series` objects are mapped to the first visualMap's 'max' color. If `type` 'piecewise' - the following `series` objects are mapped to the first `visualMap` object's 'outofrange' color.
### Expected Behavior
Each `series` object to map to its corresponding `visualMap` object when referenced using the related `seriesIndex` and depict the threshold colors of that `visualMap` object.
### Environment
_No response_
### Any additional comments?
Both continuous and piecewise examples:
https://codepen.io/amcveyCW/pen/OPLbpbd
https://codepen.io/amcveyCW/pen/QwLGpdL
NOTE: One `visualMap` is not sufficient in my case where I have two separate regions that map to two different metrics. Imagine an image of a radiator and a fan - the radiator is mapped to a temperature value while the fan is mapped to a speed value.
NOTE: Using `geo` and `geoIndex` is an alternative that does not cause superimposed maps. https://codepen.io/amcveyCW/pen/MYgJxaV
Contributor guide
Assessment
This issue has not been assessed yet.