-
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] Selected state not correctly redrawn when updating map data with setOption
#20502
Comments
not-a-bug, scatter update on map works fine - Demo The issue list is reserved exclusively for bug reports and feature requests.
|
Scatter works fine. It is the update of the |
If you update the map geometry, then you'll have to register it again with |
setOption
setOption
After some more experimentation, there seems to be an inconsistency in the way svg map are handled compared to geojson maps. In this pen I set up two identical plots, the left one using the svg representation of some test data and the right one using the geojson representation. When clicking an area in the left plot, the selection-highlighting is preserved when changing the data, while in the right plot, it isn't. |
Version
5.5.1
Link to Minimal Reproduction
https://codepen.io/SupergGrobi/pen/YzmdOKW
Steps to Reproduce
Current Behavior
when clicking the "new data" button (which updates the
data.value
field of every entry in themap
series) while an area is selected, the new data is accurately updated for all areas, however, the state of the current selection is no longer shown, but re-appears when hovering over the dataseries.Expected Behavior
the unselected areas are redrawn with the new colors and the selected area is drawn considering the styling for highlighted/selected datapoints. No hovering should be required to get to this state.
Environment
Any additional comments?
This behaviour seems to be connected to having the
geo
component explicitly present in the options. In my usecase, I need it explicitly, as I want to scatter some points into the same map later on (see the mwe). (although the behaviour in that case is not super smooth either)Somehow, this seems to work with an svg map, as in this example: modified french beef map (which updates the data a second after each selection)
The text was updated successfully, but these errors were encountered: