Doesn't work any idea why?

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

<style>
.bar1 {
  width: 25px;
  height: 100px;
  /* Add your code below this line */

  margin:2px;
  /* Add your code above this line */
  display: inline-block;
  background-color: blue;
}
</style>
<body>
<script>
  const dataset = [12, 31, 22, 17, 25, 18, 29, 14, 9];

  d3.select("body").selectAll("div")
    .data(dataset)
    .enter()
    .append("div")
    .attr("class", "bar1")
    .style("height", (d) => (d*10+"px" )) 
</script>
</body>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36 Edg/91.0.864.41

Challenge: Change the Presentation of a Bar Chart

Link to the challenge:

Hello @fmport123

What doesn’t work? Please put more details to your question like. What are you trying to do, and what did you do, Or what the error says.

The code you have shared works on my end. Please ensure that you have disabled any extensions that interface with the freeCodeCamp website (such as Dark Mode and Ad Blocker), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

thanks , jwilkins.oboe for your answer .
so I checked and " Installed extensions You haven’t installed any extensions " also my zoom level in on 100% also checked , no Dark Mode and Ad Blocker and also all the other exercise until that one worked and also the one after , just that one doesnt

Thanks Fierceincii ,
looks like the code is running without errors and do what it suppose to do , but when i run the test , it does not except it .
so i checked and i saw those two errors in the console "
/page-data/fcc08bc5ac7-7f9b-408a-8c98-c21db21fc267/page-data.json:1 Failed to load resource: the server responded with a status of 404 ()
/fcc08bc5ac7-7f9b-408a-8c98-c21db21fc267:1 Failed to load resource: the server responded with a status of 404 ()"
so I copied the source code that i get from the browser when i inspect it .

.bar1 { width: 25px; height: 100px; /* Add your code below this line */
margin:2px;
/* Add your code above this line */
display: inline-block;
background-color: blue;

}

<!-- fcc-end-source -->

I would try clearing your cache and restarting your browser.

It does sound like a potential cache issue. Copy the code, reset the challenge, press F12 then left-click and hold the reload button and select “empty cache and hard reload” at the bottom. Paste in your code and try the submit again.

You can also try in a new InPrivate window just to test (but you won’t be logged in so you have to do it again).

If that doesn’t work it is possibly some network issue, which will usually clear itself at some point. If it doesn’t let us know.

Hi Iasjorg ,
thanks for the reply .
i followed your instructions , the empty cache and hard reload didnt helped
also opened an incognito window and tried it and it didnt work .
everything else works just this section isnt .
this is the error i saw in the console , its 404


also this is what i get when running the Test

so network issue ?

I don’t understand the request path you have for that file, this is how it looks for me:

https://www.freecodecamp.org/page-data/learn/data-visualization/data-visualization-with-d3/change-the-presentation-of-a-bar-chart/page-data.json

  1. Try a different browser, like Firefox.

  2. Try using a VPN to test with a different IP. If that works, it might be good knowing which country you are in and what Internet provider you are using.

  3. Try the .dev version of the site (challenge) just as a test.

Thanks again lasjorg for your reply !!


it worked ,
the VPN didnt made a different but the new browser did !!
thanks again

1 Like

Good to hear.

Was it only using a different browser? Or did you use the .dev version of the site as well?

didn’t got to the .dev option , I tried VPN then the browser and it worked, I stopped there.

Great, just checking. Happy coding!

1 Like