Properly display bin width in barChart using dc.js and crossfilter.js
问题 I'm making a bar chart using the Dimensional Charting javascript library dc.js, which is based on d3 and crossfilter. All I want to do is display a histogram with a specified number of bins, this should be easy using the barChart function. I have an array called data which contains floating-point values between 0 and 90000, and I just want to display the distribution using a histogram with 10 bins. I use the following code to produce the histogram below: var cf = crossfilter(data); var dim =