block by aaizemberg 61cfe07005eba3f9f55742e735c05712

creando 3 párrafos desde d3.js

Full Screen

index.html

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">

  <!-- cargando d3.js -->
  <script src="https://d3js.org/d3.v5.min.js"></script>
  
  <title>d3js</title>
</head>
<body>
  <div id="header"></div>
  
  <div id="vis">
  </div>
  
  <script>
    /* comento esta parte

d3.select("div#header")
  .append("h1")
  .text("La visualizacion");
*/

var datos = ['uno','dos','tres'];

d3.select("div#vis").selectAll("p")
  .data(datos)
    .enter()
    .append("p")
    .text( function(d) { return d; } )
//    .text( (d) => d  )

    
  </script>  
  
</body>
</html>