Skip to content

Set crosshair axis position #1706

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

Open
harrylojames opened this issue Jun 21, 2023 · 3 comments
Open

Set crosshair axis position #1706

harrylojames opened this issue Jun 21, 2023 · 3 comments

Comments

@harrylojames
Copy link

Hi,

Loving the crosshair feature!

Is it possible to have the position of the crosshair match the axis either automatically or manually?

See here for an example.

image

Feel free to close/move if this is a duplicate of #1596.

Many thanks,

Harry

@mbostock
Copy link
Member

In the example you provide, you’d like the x-value to be drawn on top (where the x-axis is) rather than on bottom, correct?

@harrylojames
Copy link
Author

That's correct :)

@Fil
Copy link
Contributor

Fil commented Jun 21, 2023

The orientations are currently hard-coded. If that was to become an option, maybe something like anchor: "top-right"? One difficulty is that we want to align exactly with the axis, if possible. For the top anchor we would need to set dy: -9, frameAnchor: "top", lineAnchor: "bottom".

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

No branches or pull requests

3 participants