Skip to content

crosshair format option #1597

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

crosshair format option #1597

wants to merge 1 commit into from

Conversation

mbostock
Copy link
Member

Fixes #1596. E.g.,

Plot.crosshair(olympians, {x: "weight", y: "height", format: {x: ".1f", y: ".3f"}})

Maybe it should pick a smarter default format, similar to scale ticks (but like, assuming ~100 ticks instead of ~10, and always trimming trailing zeroes)? Maybe you should be able to specify format: ".1f" shorthand for both x and y?

@mbostock mbostock requested a review from Fil May 20, 2023 00:03
@Fil
Copy link
Contributor

Fil commented May 20, 2023

Good idea(s). The shorthand "single format" is not high priority. We'll probably want a similar behavior for the tip mark?

@mbostock mbostock mentioned this pull request May 22, 2023
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.

Custom format for the crosshair mark?
2 participants