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
Without varying stroke widths I see the expected links. But once I add strokeWidth as a channel, the values appear to be interpreted literally, making them too large enough to overwhelm the plot. (I can see them vary if I manually scale the values with something like strokeWidth: d => d.count / 100.
I've tried adding a strokeWidth object with a range and type: "log", but that doesn't seem to get me the result I'm looking for, unfortunately!
The text was updated successfully, but these errors were encountered:
jimjam-slam
changed the title
Can't vary strokeWidth of links/arrows on a map
Can't use strokeWidth as a channel for links/arrows on a map
Mar 12, 2024
The strokeWidth channel is not bound to a scale, so you can only it express it as literal values (currently). As you discerned, you’ll need to say something like strokeWidth: (d) => d.count / 100, replacing 100 with whatever value is appropriate to your data.
The finite state machine example shows the use of
strokeWidth
as a channel to vary widths. But getting this going on a map is proving tricky:https://observablehq.com/@jimjamslam/vary-stroke-width-on-map
Without varying stroke widths I see the expected links. But once I add
strokeWidth
as a channel, the values appear to be interpreted literally, making them too large enough to overwhelm the plot. (I can see them vary if I manually scale the values with something likestrokeWidth: d => d.count / 100
.I've tried adding a
strokeWidth
object with arange
andtype: "log"
, but that doesn't seem to get me the result I'm looking for, unfortunately!The text was updated successfully, but these errors were encountered: