Data Visualization Projects - Visualize Data with a Bar Chart (Test 9 fail)

Tell us what’s happening:

Step 9 is failing.
" 9. Each bar element’s height should accurately represent the data’s corresponding GDP"

The heights of the bars should correspond to the data values : expected '47.417' to equal '47.418'
AssertionError: The heights of the bars should correspond to the data values : expected '47.417' to equal '47.418'
    at n.equal (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:556:320)
    at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:197700
    at NodeList.forEach (<anonymous>)
    at n.<anonymous> (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:197587)
    at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:265533
    at Kb.run (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:265828)
    at CC.runTest (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:280794)
    at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:281730
    at o (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:280133)
    at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:280203

When I clicked on it, I was able to see the code, which was not too obfuscated, and I worked out that the decimals were:

height of bar / data-gdp of bar

The 47.417 value was this value for the first bar (rounded to three digits), and it was supposed to equal the value for at least ONE other bar. The value for the second bar was 47.418. So, can anyone help me fix this off-by-one situation?

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36

Challenge Information:

Data Visualization Projects - Visualize Data with a Bar Chart

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.