XYChart remove inner padding between the chart and the axis #1700
-
Hi, I have been using visx for a few months now and it has been great working with this library. Codesandbox link: https://codesandbox.io/s/withered-sun-1rfyyz?file=/src/App.tsx Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @matecsigi thanks for checkout out Here's an update with a time scale which corrects the problem https://codesandbox.io/s/fancy-mountain-d7u9v4?file=/src/App.tsx |
Beta Was this translation helpful? Give feedback.
Hey @matecsigi thanks for checkout out
visx
. This spacing comes from theband
type scale which you are using for the x-axis. this is often used for bar charts where each point has a width – and in this case the line point is in the middle of the band (the d3-scale docs have a good visual explanation of this)Here's an update with a time scale which corrects the problem https://codesandbox.io/s/fancy-mountain-d7u9v4?file=/src/App.tsx