Created
August 3, 2019 13:18
-
-
Save aaizemberg/61cfe07005eba3f9f55742e735c05712 to your computer and use it in GitHub Desktop.
creando 3 párrafos desde d3.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment