Support xOffset
and yOffset
as encoding channels
#230
Labels
core
Related to the Core package
good first issue
Good for newcomers
Improvement
Improve an existing functionality, don't introduce a new feature
Current situation
xOffset
andyOffset
are supported as mark properties and they translate the viewport. In addition,dx
anddy
are are sometimes supported as channels ("point"
mark), sometimes as mark properties ("text"
mark), and sometimes not at all. This is incompatible with Vega-Lite, which supportsdx
anddy
as a mark properties in its"text"
mark but not elsewhere. And nowhere as an encoding channel.What to do
It might make sense to support
xOffset
andyOffset
as channels instead and also implementx2Offset
andy2Offset
. In addition,dx
anddy
would be mark properties solely in"text"
mark. However, the gene annotation track relies ondx
as a channel to adjust the strand triangles' placement. Thus, this would be a breaking change.Use cases
Lollipops
The
y2Offset
property would be useful with "lollipop" plots, where the bottom of the "stick" should be moved outside the scale to make a contact with the protein:(source: https://www.mdpi.com/1422-0067/20/14/3442)
SV paws
The paws of the SV arcs can be implemented using the
"point"
mark. However, controlling the paw's "stroke width" is impossible and getting it's size to align nicely with the arc's stroke width is tricky. An alternative approach would be to use the"rule"
mark and map the strand (paw direction) toxOffset
with a nominal scale and a range comprising a negative and a positive value. Thus,xOffset
would shift x to either left or right side of the arc's endpoint. In this case,x2Offset
should be set to zero.The text was updated successfully, but these errors were encountered: