This experiment extends the previuos one by handling model changes. By clicking on one of the three SVG, the model hue attribute is randomically changed. Since the views (SVGs) are listening to model changes (through the listenTo function), the hue of all of them is automatically changed by Backbone.
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8">
<title>Backbone D3View + flex madness</title>
<link type="text/css" href="index.css" rel="stylesheet"/>
<!-- dependencies -->
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="https://underscorejs.org/underscore-min.js"></script>
<script src="https://backbonejs.org/backbone-min.js"></script>
<script src="backbone.d3view.js"></script>
<!-- your views go here -->
<script src="chart.js"></script>
<!-- your models go here -->
<script src="color.js"></script>
</head>
<body>
<svg id="chart_1"></svg>
<div id="side">
<svg id="chart_2"></svg>
<svg id="chart_3"></svg>
</div>
<script src="index.js"></script>
</body>
</html>
Modified http://d3js.org/d3.v3.min.js to a secure url
Modified http://underscorejs.org/underscore-min.js to a secure url
Modified http://backbonejs.org/backbone-min.js to a secure url
https://d3js.org/d3.v3.min.js
https://underscorejs.org/underscore-min.js
https://backbonejs.org/backbone-min.js