Skip to content
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

Separate positive and negative fill colors for areas (for difference charts), or an area clipping channel or mark (and then use two marks). #159

Closed
mbostock opened this issue Feb 24, 2021 · 4 comments · Fixed by #1896
Assignees
Labels
enhancement New feature or request

Comments

@mbostock
Copy link
Member

No description provided.

@mbostock mbostock added the enhancement New feature or request label Feb 24, 2021
@Fil
Copy link
Contributor

Fil commented Feb 25, 2021

differenceArea plugin in https://observablehq.com/@observablehq/plot-difference-chart

@Fil
Copy link
Contributor

Fil commented Sep 28, 2021

My plugin mentioned above is infinitely more complex than filling the space with vertical rules, as Zan suggested.

@mbostock
Copy link
Member Author

mbostock commented Aug 9, 2023

It looks like since June 29 the difference chart example no longer uses clipping? But I believe that approach isn’t viable when the curve is affected by multiple points (even in the case of linear, but most acutely with basis)?

Here is a take using a render transform and a compound mark:

https://observablehq.com/d/1e37e3c09876e460

Before:
untitled (60)

After:
untitled (61)

@Fil
Copy link
Contributor

Fil commented Aug 9, 2023

Yes I simplified it since in that case the clipping approach was overkill, and I wanted to revisit the implementation when we did #1109 (Also, you may have noticed that I had inadvertently switched the colors!)

@mbostock mbostock self-assigned this Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants