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

Add axis values for the droplines/crosshair #143

Open
IPWright83 opened this issue Jun 8, 2023 · 1 comment
Open

Add axis values for the droplines/crosshair #143

IPWright83 opened this issue Jun 8, 2023 · 1 comment
Labels
Canvas enhancement New feature or request SVG

Comments

@IPWright83
Copy link
Owner

@curran suggested adding in values on the axis when using droplinesa /crosshair which is a great idea.

image-1

Look at https://developer.mozilla.org/en-US/docs/Web/CSS/paint-order as a way to achieve a nice contrast

@IPWright83 IPWright83 added the enhancement New feature or request label Jun 8, 2023
@IPWright83
Copy link
Owner Author

IPWright83 commented Jun 11, 2023

This is relatively easy to add into the layers, if we know the value to be added. At the moment the crosshair purely works from the mouse position.

To make this work, it'll need to use those co-ordinates through a d3.scale inversion. At the moment though it's not clear which Scale the crosshair would use. We need to either:

  • Pass 1-2 scales into the Crosshair component
  • Append horizontal/vertical meta-data onto scales so we can add new selectors to get this information for the Crosshair.

Note that also d3.scaleBand doesn't have an invert function. Could look at using https://stackoverflow.com/a/38746923/21061

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Canvas enhancement New feature or request SVG
Projects
None yet
Development

No branches or pull requests

1 participant