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
We advertise that ChannelValueSpec can be used in place of ChannelValue, but there are quite a few places where we assume ChannelValue instead of ChannelValueSpec. I tried to do a survey here:
src/channel.js (createChannel is only called with a ChannelValue)
src/options.js (numberChannel is only called with a ChannelValue)
src/style.js (maybeColorChannel does not support fill as ChannelValueSpec)
src/style.js (maybeNumberChannel does not support fillOpacity as ChannelValueSpec)
src/style.js (maybeColorChannel does not support stroke as ChannelValueSpec)
src/style.js (maybeNumberChannel does not support strokeOpacity as ChannelValueSpec)
src/style.js (maybeNumberChannel does not support strokeWidth as ChannelValueSpec)
src/style.js (maybeNumberChannel does not support opacity as ChannelValueSpec)
src/marks/auto.js (materializeValue is only called with a ChannelValue)
src/marks/axis.js (channels only contains Channel with ChannelValue)
src/marks/cell.js (maybeColorChannel does not support stroke as ChannelValueSpec)
src/marks/cell.js (maybeColorChannel does not support stroke as ChannelValueSpec)
src/transforms/basic.js filterTransform (test must be a ChannelValue)
src/transforms/map.js (maybeZ does not support {value} for fill and stroke)
src/transforms/select.js (maybeZ does not support {value} for fill and stroke)
src/transforms/select.js (selectChannel does not support {value} for v)
src/transforms/stack.js (does not support x as ChannelValueSpec)
src/transforms/stack.js (does not support y as ChannelValueSpec)
src/transforms/stack.js (maybeZ does not support {value} for fill and stroke)
src/transforms/stack.js (order must be a ChannelValue)
src/transforms/tree.js (path must be a ChannelValue)
src/transforms/tree.js (path must be a ChannelValue)
I don’t think the fix is to add ChannelValueSpec support to Plot.valueof (or at least, that isn’t sufficient). For example, there are places where we call maybeColorChannel that would need to support ChannelValueSpec, and maybeZ should allow a ChannelValueSpec for fill and stroke but not z. 🤔
We advertise that ChannelValueSpec can be used in place of ChannelValue, but there are quite a few places where we assume ChannelValue instead of ChannelValueSpec. I tried to do a survey here:
I don’t think the fix is to add ChannelValueSpec support to Plot.valueof (or at least, that isn’t sufficient). For example, there are places where we call maybeColorChannel that would need to support ChannelValueSpec, and maybeZ should allow a ChannelValueSpec for fill and stroke but not z. 🤔
Related #1869.
The text was updated successfully, but these errors were encountered: