I am creating a D3 Bar Chart project and I am at the beginning.
When I try to create a x-axis I can’t see it.
When I delete the attr function which add translate function to transform attribute. The axis showed up on the top of the svg element. What’s wrong?
try adjusting the right-side input from 400 to 300 to 200 to 100 and you’ll see the axis appear and move up the screen. In translate(60, 400), 60 represents a translation in the positive-x direction ( to the right) and 400 represents a translation in the positive-y direction (downward in d3). So, when you go from 400 to 300, you are moving the axis upward by 100 units.