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
My understanding is that for Plot geo we could change the "string accessor" convention to be: field === "id" ? (d => d.id) : (d => d.properties[field])
After checking for color names etc. To get a field that is not accessible through that convention, you'd have to create your own function accessor.
That wouldn’t be backwards-compatible with the current behavior. But maybe it’s a small enough breakage that it’s okay. Or we could do something like this:
d => (d[field] === undefined ? d.properties : d)[field]
I’m not sure where we’d make this change, though. Like, would you expect it to work with a bin transform’s call to valueof too? In which case we’d need to change the behavior of valueof globally for GeoJSON rather than just changing the channels of the geo mark.
It’d be nice if Plot.geo supported shorthand for GeoJSON properties, e.g.,
would be shorthand for
I’m not sure how to do it, though, because in theory the properties could be on the features directly, and we’d still want it to work in that case.
The text was updated successfully, but these errors were encountered: