-
Notifications
You must be signed in to change notification settings - Fork 19.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Multiple map series and visualMap objects not mapping as expected #20587
Comments
Why have two identical maps superimposed ? Usually one map is sufficient - Demo. |
Hey @amandamcvey I am not sure what functionality you are looking for but its currently works if you remove the series index but still the the mappings of the first visual map is still showing in the second one |
@helgasoft Hi! Unfortunately one visualMap is not sufficient in my case. I have two separate regions that map to two different data points. 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. Can't use the same visualMap in this case |
@Adarsh-Dhar Hi! unfortunately your example does not work as expected if both series are mapped to the second visualMap object. This can be confirmed by using the slider of the second visualMap. |
I seriously doubt ECharts allows more than a single map on a chart. Simple experiment is to set a different center on each map. |
@helgasoft i wrote this issue to only include the bare minimum amount of code needed to show the bug per the bug report requirements, but if the superimposed map is an issue - using geo and geoIndex is an alternative that does not cause multiple map figures. I will create and post an example |
@helgasoft here is an example using geo https://codepen.io/amcveyCW/pen/MYgJxaV |
I think your last example is a good illustration of the bug. There are two map series defined, but their data is auto-merged into one (=bug!). The first visualMap controls it. The second visualMap controls nothing since there is no second map. OTOH, using geo is a good idea - geo acts like grid and we can have multiple geo areas superimposed - Demo. |
@helgasoft Your multiple geo solution should work for me, luckily I do not currently need roam. Thank you! |
@amandamcvey, thank you for not giving up :-) Now I think the bug is in seriesIndex of the first visualMap. Parameter |
Version
5.5.1
Link to Minimal Reproduction
https://codepen.io/amcveyCW/pen/OPLbpbd
Steps to Reproduce
series
objects. Each should be oftype
'map,' reference some map SVG, and include their own data array relating to the referenced map.visualMap
objects, either 'piecewise' or 'continuous'type
. Set up some unique min/max/color/etc for each object. Each should includeseriesIndex
and the value should reference one of the correspondingseries
object created in the above step.legend
for testing purposes.visualMap
object'sseriesIndex
is not respected and it controls both map series. By comparison, the followingvisualMap
objects behave correctly and theirseriesIndex
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. Iftype
'continuous' - the followingseries
objects are mapped to the first visualMap's 'max' color. Iftype
'piecewise' - the followingseries
objects are mapped to the firstvisualMap
object's 'outofrange' color.Expected Behavior
Each
series
object to map to its correspondingvisualMap
object when referenced using the relatedseriesIndex
and depict the threshold colors of thatvisualMap
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
andgeoIndex
is an alternative that does not cause superimposed maps. https://codepen.io/amcveyCW/pen/MYgJxaVThe text was updated successfully, but these errors were encountered: