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

Bar Chart X-Axis Label Display Issues #101

Open
PfisterFactor opened this issue Apr 10, 2022 · 0 comments
Open

Bar Chart X-Axis Label Display Issues #101

PfisterFactor opened this issue Apr 10, 2022 · 0 comments

Comments

@PfisterFactor
Copy link

PfisterFactor commented Apr 10, 2022

Describe the bug
Svelte REPL
The x-labels are not centered with the ticks on the bar chart, and the text gets cut off vertically (see the 'y' in "bye").

I copied the default code from the website here, kept all the style parameters the same (except I removed the y-axis units) and made a component in my project.

I was able to fix the text centering by changing the x-axis text component to:
<text y={marginBottom} dx={reactiveXScale.bandwidth() / 2} style="text-anchor: middle;">{xVal}</text>,
but I am having trouble fixing the text height cut off bug.

To Reproduce
Steps to reproduce the behavior:

  1. See Svelte REPL

Expected behavior
The x-labels are centered and the text does not get cut off.

Screenshots
Screen Shot 2022-04-10 at 3 17 54 PM

Desktop (please complete the following information):

  • OS: Mac OS Monterey, M1
  • Browser: Firefox
  • Version: 99
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

1 participant