// Generated by CoffeeScript 1.10.0 (function() { var d1, d2; d1 = new Data; d2 = new Data({ data: [ { value: 3, id: 'a' }, { value: 4, id: 'b' }, { value: 2, id: 'c' }, { value: 1, id: 'd' }, { value: 2, id: 'e' }, { value: 3, id: 'f' } ] }); new BarChart({ el: "#chart", model: d1, tooltip: function(d, i) { return "Index: " + i + "\nValue: " + d; } }); new BarChart({ el: "#chart2", model: d1, orientation: 'vertical', scales: { size: { domain: function(data) { return [0, Math.ceil(d3.max(data) / 10) * 10]; } } } }); new BarChart({ el: "#chart3", model: d2, key: function(d) { return d.id; }, value: function(d) { return d.value; }, scales: { color: { type: d3.scale.category20b } }, tooltip: function(d, i) { return "ID: " + d.id + "\nValue: " + d.value; } }); }).call(this);