Can someone help me pass the pending 3 test cases. https://codepen.io/chiragtutlani/pen/KBxLgy?editors=1111

Can someone help me pass the pending 3 test cases. https://codepen.io/chiragtutlani/pen/KBxLgy?editors=1111
0

#1

Please help the pass the last 3 test cases.
I cannont think of what to do to pass them.
Please help me.


#2

I did the same mistake.

I finally make it with as you do, but there if the window is resize or codepen bar must less and etc. ,but I never been able to fullfill the story in all cases and the Y goal only in my desktop.
The all try only half of dataset in your case you set GDP only. actually the current easy way is create third dataset with both values

 let dataset= json.data.map(function(item){
     item.val= item[1];
item.year= item[0];
    });
and then
.data(json)
      .enter()
      .append("rect")
      .attr("x",(d,i)=>marginX+xScale(d.val))      
      .attr("y",(d)=>400-marginY-yScale(d.year))

or use as dataset json directly and in
.data(json)
      .enter()
      .append("rect")
      .attr("x",(d,i)=>marginX+xScale(d[1]))      
      .attr("y",(d)=>400-marginY-yScale(d[0]))