Data Visualization with D3 - Work with Data in D3h

Tell us what’s happening:
Describe your issue in detail here.
how can make sure my h2 has 9 elements
Your code so far

<body>
 <h2>New Title</h2>
  <script>
    const dataset = [12, 31, 22, 17, 25, 18, 29, 14, 9];

    // Add your code below this line
 d3.select("ul").selectAll("li")
      .data(dataset)
      .enter(9)
     

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

Your browser information:

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

Challenge: Data Visualization with D3 - Work with Data in D3

Link to the challenge:

enter() doesn’t take any arguments. Remove the 9 and add .append("li"), and it will add one <li> element for each item in your dataset.

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