Skip to content

channel aliases; mark.with #798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

channel aliases; mark.with #798

wants to merge 1 commit into from

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Mar 7, 2022

Supersedes #719; related #708 (comment). For example (note that the data is randomly generated, but the line and dots are consistent, hence demonstrating that the aliased values are not recomputed in the derived mark):

Screen Shot 2022-03-07 at 8 07 16 AM

Plot.lineY({length: 500}, Plot.mapY("cumsum", {y: randomNormal, stroke: "blue"})).with(Plot.dot)

There are still some things to figure out here, though, like what does this mean for transforms? In this implementation, the transform is re-applied in the derived mark, but I don’t think we want that; I think instead the derived mark should somehow inherit the derived data and index from the source mark without recomputing the transform. Then any new channels on the derived mark would presumably be computed on the transformed data, similar to layouts?

@mbostock mbostock requested a review from Fil March 7, 2022 16:10
@mbostock mbostock mentioned this pull request Mar 7, 2022
@Fil Fil mentioned this pull request Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant