Skip to content

Offsets can cause axis labels to go offscreen. #18

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

Closed
mbostock opened this issue Nov 2, 2020 · 0 comments
Closed

Offsets can cause axis labels to go offscreen. #18

mbostock opened this issue Nov 2, 2020 · 0 comments
Labels
bug Something isn’t working

Comments

@mbostock
Copy link
Member

mbostock commented Nov 2, 2020

I think this might be related to #1, but we need to do some clamping or reconsider whether axis offsets apply to label anchors. Note the “V” is cut in half below:

Screen Shot 2020-11-02 at 1 36 36 PM

Plot.Dot(AAPL, {
  x: {
    value: d => Math.abs(d.Close - d.Open) / d.Open * 100,
    label: "Daily change (%) →",
    format: "+f",
    rule: 0
  },
  y: {
    value: d => Math.log10(d.Volume),
    label: "↑ Volume (log₁₀)",
    offset: 12
  },
  grid: true
})
@mbostock mbostock added the bug Something isn’t working label Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Projects
None yet
Development

No branches or pull requests

1 participant