Skip to content

[enhancement] Expose Mark's data properties like domain #1030

Answered by mbostock
dgrcode asked this question in Q&A
Discussion options

You must be logged in to vote

I don’t think the proposed API would work well because it only considers a single mark (the line mark); in practice most Plots include multiple marks as well as scale options which collectively affect the definition of the y-scale domain. Therefore it would be almost intractable to pull out a single mark (or a subset of the plot), extract the y-scale definition, and then construct a new plot with an almost-the-same-but-not-quite definition of the y-scale.

Like @Fil said, the inset and nice scale options are both attractive here. The issue with the inset option is that it is in screen space (i.e., range) rather than data space (i.e., domain). I could imagine another scale option that is fo…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@dgrcode
Comment options

Comment options

You must be logged in to vote
1 reply
@dgrcode
Comment options

Answer selected by Fil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1028 on August 22, 2022 17:22.