You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when clicking the "new data" button (which updates the data.value field of every entry in the map 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
- OS:macOS Sonoma
- Browser: Chrome
- Framework: plain javascript as well as Vue@3
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:
not-a-bug, scatter update on map works fine - Demo
Please close issue if problem solved.
Debug and "how to" questions are better posted on stackoverflow, where there are more volunteers to help.
🚩 Please follow Official posting guidelines (below).
The issue list is reserved exclusively for bug reports and feature requests.
For usage questions, please use the following resources:
Scatter works fine. It is the update of the map series (id 0) which causes the problems. I remove the scatter from the mwe, to highlight the issue. (I had it in there to show that my use case can not be reformulated in terms of only a series, without the geo component)
I do not update the map geometry. I update the data from which the colors of each area are calculated. My whole problem is, that when I do this, the selected state of an area is not correctly redrawn.
henrik-wolf
changed the title
[Bug] incorrect behaviour when updating map data with setOption
[Bug] Selected state not correctly redrawn when updating map data with setOptionNov 12, 2024
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: