m working on the d3 Bar chart and Im stuck with my y axis. My data are floats in an array called gdp.
I define my y axis like this:
const y = d3.scaleLinear() .domain(d3.extent(gdp)) .range([0, svgHeight])
Than I call it like this: const yAxe = ySVG.append("g") .attr("id", "y-axis") .call(yAxis);
I tried to add .ticks(10) to first piece of code (even the second) but I don’t see them. Strangely, this solution passes the ticks test. (number 4). I looked on several d3 tutorials and topics here and tried suggested solutions. I still have no idea, why I don`t see any ticks.
Your code so far
Here is my whole pen:
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0.
Challenge: Visualize Data with a Bar Chart
Link to the challenge: