Skip to content

Instantly share code, notes, and snippets.

@cannelflow
Created March 26, 2016 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cannelflow/478328a4cb21afc4de44 to your computer and use it in GitHub Desktop.
Save cannelflow/478328a4cb21afc4de44 to your computer and use it in GitHub Desktop.
demo.js
tried like
//update data
rects.attr({
"x": function (d) { return xScale(d.country); },
"y": function (d) { return yScale(d.gdp); },
"width": xScale.rangeBand(),
}).
attr("height", 0).
attr("y", h).
transition().duration(3000).
delay(function (d, i) {
return i * 200;
}).
attr("height", function (d) {
return h - yScale(d.gdp)
});
its working but bar is going downward with transition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment