# Change the Presentation of a Bar Chart

**URL:** <https://forum.freecodecamp.org/t/change-the-presentation-of-a-bar-chart/209190>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [July 16, 2018, 12:48pm UTC](https://forum.freecodecamp.org/t/change-the-presentation-of-a-bar-chart/209190 "2018-07-16T12:48:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aditya2000](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/aditya2000/32/77091_2.png) [@aditya2000](https://forum.freecodecamp.org/u/aditya2000)\
**Post date:** [July 16, 2018, 12:48pm UTC](https://forum.freecodecamp.org/t/change-the-presentation-of-a-bar-chart/209190/1 "2018-07-16T12:48:53Z")

</div>

Can anyone tell me what’s wrong or missed something? It’s not working

**Your code so far**

```html

<style>
  .bar {
    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", "bar")
      // Add your code below this line
      .style("height", (d) => (d*10 + "px")

      )

      // Add your code above this line
  </script>
</body>

```

**Your browser information:**

User Agent is: `Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36`.

**Link to the challenge:**

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/data-visualization/data-visualization-with-d3/change-the-presentation-of-a-bar-chart)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![PortableStick](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/portablestick/32/65591_2.png) [@PortableStick](https://forum.freecodecamp.org/u/PortableStick)\
**Post date:** [July 16, 2018, 1:55pm UTC](https://forum.freecodecamp.org/t/change-the-presentation-of-a-bar-chart/209190/2 "2018-07-16T13:55:26Z")

</div>

Your code is working when I paste it in. Try clearing your code and then copying it back in. If that doesn’t work, maybe try a different browser.

---

<div class="post-metadata">

**Author:** ![aditya2000](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/aditya2000/32/77091_2.png) [@aditya2000](https://forum.freecodecamp.org/u/aditya2000)\
**Post date:** [July 17, 2018, 12:47am UTC](https://forum.freecodecamp.org/t/change-the-presentation-of-a-bar-chart/209190/3 "2018-07-17T00:47:25Z")

</div>

It worked. Thanks a lot for your help

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [February 2, 2021, 11:39am UTC](https://forum.freecodecamp.org/t/change-the-presentation-of-a-bar-chart/209190/4 "2021-02-02T11:39:01Z")

</div>


