- change y to the height of viewport minus the datapoint
- change the height of the bar to the datapoint
Use d3.scaleLinear
This is the example from mint green man. video is on local drive E: under Videos\d3\
.attr("fill", "teal");
.attr("fill", function(d) {
return "rgb(0, 0, " + (d * 10) + ")";
});
svg.selectAll("text")
.data(dataset)
.enter()
.append("text")
.text(function(d) {
return d;
})
Chain attributes for x and y.
.attr("font-family", "sans-serif")
.attr("font-size", "11px")
.attr("fill", "white");

