Skip to content

Instantly share code, notes, and snippets.

Last active December 16, 2015 08:49
What would you like to do?
Ex. 3 in Reactive Bar Chart Article
function BarChart(svg) {
this.width = $R.state(200);
this.height = $R.state(200); = $R.state([]);
var y = $R(BarChart.y).bindTo(this.height,
BarChart.y = function (height, data) {
return d3.scale.linear()
.domain([0, d3.max(data, function(d) { return d.value })])
.range([height, 0]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment