Skip to content

tip option #1537

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

Merged
merged 4 commits into from
May 12, 2023
Merged

tip option #1537

merged 4 commits into from
May 12, 2023

Conversation

mbostock
Copy link
Member

This adds a tip option for generating a tip mark + pointer interaction from a given mark. It can be set to x, y, or xy for pointerX, pointerY, or pointer respectively, or to true in which case the default orientation is used (such as x in conjunction with implicit stackY). When plotting, these marks are created implemented and drawn atop all other marks.

In the future, perhaps the tip option could be specified as an object allowing additional tip options such as anchor.

@mbostock mbostock requested a review from Fil May 11, 2023 22:01
@Fil
Copy link
Contributor

Fil commented May 11, 2023

Love it! One thing to consider, is whether dodgeY should default to x—using xy in that case feels more natural to me, and also more usable on mobile. ymmv

@mbostock
Copy link
Member Author

You’re right; I overindexed on the test case. I’ve removed the one-dimensional defaults for dodge. 🙏

@yurivish yurivish mentioned this pull request May 11, 2023
57 tasks
@mbostock mbostock force-pushed the mbostock/tip-option branch from c2e38ea to 794c70a Compare May 12, 2023 00:03
@mbostock mbostock enabled auto-merge (squash) May 12, 2023 00:10
@mbostock mbostock merged commit 9be3c13 into main May 12, 2023
@mbostock mbostock deleted the mbostock/tip-option branch May 12, 2023 00:11
chaichontat pushed a commit to chaichontat/plot that referenced this pull request Jan 14, 2024
* tip option

* remove dodge tip default

* sort import

* withTip helper
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.

2 participants