JSFiddle - React, Tailwind, and code Playground
by Steven Senkus
HTML
<script src="http://d3js.org/d3.v3.min.js"></script>
<div id="chart-2"></div>
CSS
body {
background-color: #fff;
text-align: center;
}
svg {
background-color: #fff;
margin: 50px auto;
}
JavaScript
var x = 0;
var mta = [{
status: ["GOOD SERVICE"],
name: ["123"],
url: [null],
text: ["..."],
plannedworkheadline: [null],
Time: [" 7:35AM"],
Date: ["12/15/2011"]
}];
var dataset = [4, 5, 6, 7, 8];
/*
d3.select("body")
.transition()
.duration(750)
.style("background-color", "#f00");
d3.select("body").selectAll("p")
.data(dataset)
.enter()
.append("p")
.text(function () {
return dataset[x++];
});
*/
d3.select('body').selectAll('p')
.data(mta)
.enter()
.append('p')
.text(function(m) {
console.log(m);
var out = [];
for (var i in m){
out.push(m[i]);
}
return out;
});