D3: Bar Chart Tests 10 & 11

I have no idea what I should try anymore. I’ve looked at at least 20 different topics on something similar but the fixes didn’t work for me, and the errors I’m getting aren’t very helpful either.

passing 12/14

My codepen

  1. The data-date attribute and its corresponding bar element should align with the corresponding value on the x-axis.
x values don't line up with x locations : expected false to be true
AssertionError: x values don't line up with x locations : expected false to be true
    at o.<anonymous> (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:549:14955)
    at o.e (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:425:182)
    at Object.e [as get] (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:92:1380)
    at Function.n.isTrue (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:574:1222)
    at a.<anonymous> (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:657:204101)
    at c (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:598:35224)
    at i.p.run (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:598:35154)
    at T.runTest (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:598:41723)
    at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:598:42605
    at o (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:598:41019)
  1. The data-gdp attribute and its corresponding bar element should align with the corresponding value on the y-axis.
y values don't line up with y locations : expected false to be true
AssertionError: y values don't line up with y locations : expected false to be true
    at o.<anonymous> (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:549:14955)
    at o.e (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:425:182)
    at Object.e [as get] (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:92:1380)
    at Function.n.isTrue (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:574:1222)
    at a.<anonymous> (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:657:204533)
    at c (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:598:35224)
    at i.p.run (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:598:35154)
    at T.runTest (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:598:41723)
    at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:598:42605
    at o (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:598:41019)

You made a wrong call on the axis (line 42) and (48)
correct it and adjust the transform properly`.
You good to go!

1 Like

Thank you so so much. I can’t believe I didn’t see that… :grimacing:

1 Like