Skip to content

channel aliases; mark.with#798

Draft
mbostock wants to merge 1 commit into
mainfrom
mbostock/mark-with
Draft

channel aliases; mark.with#798
mbostock wants to merge 1 commit into
mainfrom
mbostock/mark-with

Conversation

@mbostock
Copy link
Copy Markdown
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