dc js - Histogram using dc js
d3.js, dc.js, javascript
Solution
http://jsfiddle.net/djmartin_umich/NmWP8/
1) First load your data. In this case I loaded it directly, but you will probably want to use d3.csv (as in the example at https://github.com/dc-js/dc.js/blob/master/web/examples/bar.html).
var experiments = [
1,
10,
1,
//other data points
20];
2) Next create your crossfilter dimension and group.
var ndx = crossfilter(experiments),
typeDimension = ndx.dimension(function (d) {
return d;
}),
typeGroup = typeDimension.group().reduceCount();
3) Setup your chart
var barChart = dc.barChart("#barChart");
barChart
.width(768)
.height(480)
.x(d3.scale.linear().domain([0,40]))
.brushOn(false)
.dimension(typeDimension)
.group(typeGroup);
4) Render your chart(s)
dc.renderAll();
Problem
I have this below data. Any possibilites i can create one using `dc.js`? Can someone help me in creating a histogram using dc js? Searched all over the forum but couldn't get something useful except this post. Date : ``` numbers 1 10 1 20 35 24 26 35 12 32 35 10 1 2 32 35 36 12 ``` Stuck in this for last 2 days. Please help.