Skip to content

Instantly share code, notes, and snippets.

This variation of a donut chart demonstrates how to update values with an animated transition. Clicking on the radio buttons changes the displayed metric.

Next: Missing Data
Previous: Static Update

@danielristic
danielristic / README.md
Last active December 18, 2015 14:29 — forked from mbostock/.block

This variation of a donut chart demonstrates how to update values. Clicking on the radio buttons changes the displayed metric.

Next: Animation

@danielristic
danielristic / data.json
Last active December 18, 2015 02:59
A simple line chart using d3.js with some mouse interactions
[{"outcome_id":22,"history":[{"time":"2013-05-06T16:38:55+03:00","balance_of_power":0.2},{"time":"2013-05-07T00:38:55+03:00","balance_of_power":0.2222222222222222},{"time":"2013-05-07T08:38:55+03:00","balance_of_power":0.36363636363636365},{"time":"2013-05-07T16:38:55+03:00","balance_of_power":0.2857142857142857},{"time":"2013-05-08T00:38:55+03:00","balance_of_power":0.4117647058823529},{"time":"2013-05-08T08:38:55+03:00","balance_of_power":0.47368421052631576},{"time":"2013-05-08T16:38:55+03:00","balance_of_power":0.45},{"time":"2013-05-09T00:38:55+03:00","balance_of_power":0.42857142857142855},{"time":"2013-05-09T08:38:55+03:00","balance_of_power":0.391304347826087},{"time":"2013-05-09T16:38:55+03:00","balance_of_power":0.44},{"time":"2013-05-10T00:38:55+03:00","balance_of_power":0.39285714285714285},{"time":"2013-05-10T08:38:55+03:00","balance_of_power":0.3548387096774194},{"time":"2013-05-10T16:38:55+03:00","balance_of_power":0.3235294117647059},{"time":"2013-05-11T00:38:55+03:00","balance_of_power":0.314