block by nitaku 05a1f298ba13380ae934

D3.js dispatch

Full Screen

An example that uses d3.dispatch to keep two visualizations in sync. The code is organized in different modules, following a convention inspired by the MVC pattern.

Use the mouse to hover a bar or a section to see the corresponding datapoint in the other visualization. You can also add or remove datapoints by first clicking on the diagram to enable focus, then using the arrow keys (right to add, left to remove).

index.js

index.html

bar.coffee

bar.js

bar_chart.coffee

bar_chart.js

data.js

index.coffee

index.css

model.coffee

model.js

table.js