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

Arrow & swoop marks #38

Closed
wants to merge 2 commits into from
Closed

Arrow & swoop marks #38

wants to merge 2 commits into from

Conversation

tophtucker
Copy link
Contributor

Mostly an exercise to familiarize myself with the code. Re-used some trigonometry I wrote in 2015!!

To-do

  • both arrow and swoop feel pretty duplicative of link?? maybe that's life
  • the thing where every arrowhead needs its own marker if there's a color is… rough
  • configurable angle for swoop to subtend: should it be a channel?! how do those work…

@Fil
Copy link
Contributor

Fil commented Dec 8, 2020

both arrow and swoop feel pretty duplicative of link?? maybe that's life

you might try Swoop extends Link, and define only render()

the thing where every arrowhead needs its own marker if there's a color is… rough

it's possible to create the whole (swoopy or straight) arrow as a path; I've wasted a bit of time figuring out the tangent to the arc near the end point, but I think I got it working:
https://observablehq.com/d/c364dd180391294a

configurable angle for swoop

Or 2 angles (the swoop's and the arrowhead's sharpness), and a length (the arrowhead's maximal length).

@tophtucker
Copy link
Contributor Author

love it fil! does extending Link preclude adding channels? i dont really understand how channels work

@Fil
Copy link
Contributor

Fil commented May 1, 2021

superseded by plugin https://observablehq.com/@data-workflows/plot-arrow

@Fil Fil closed this May 1, 2021
@Fil Fil deleted the toph-arrow branch May 1, 2021 05:41
@mbostock mbostock mentioned this pull request Jan 8, 2022
5 tasks
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.

None yet

2 participants