Currently delving into the world of d3.js for the first time.
In our project, we needed to adjust the width of each bar from
line 46.attr('width', xScale.rangeBand())
to
.attr('width', '10')
line 50
After making this change, we noticed that the horizontal x axis labels were no longer aligned with the vertical bars, which was not the desired outcome.
We've attempted a few potential solutions:
- We haven't found any instances of using
tickValues
in our code. - We're unsure about where to incorporate
SVG-Text
- We don't want to resort to hiding the x axis labels
- While similar discussions have been centered around date and time axes, ours is numeric
Any suggestions or guidance would be greatly appreciated!