-
Notifications
You must be signed in to change notification settings - Fork 2
-
Reuse custom reduce functions? dc.js uses Crossfilter's generic group reduce to let you specify initialize, add, and remove functions for custom aggregation of groups. Typically, these are anonymous inline functions with field names hardcoded, but you can instead use a closure to return such a function with custom parameters.
-
Tell whether my groups are functioning correctly / whether my input data is good? Set a breakpoint on the chart initialization, after the groups are created. Run
group.all()in the debug console and see whether the keys and values make sense.
-
Is the data returned from
d3.csvord3.jsonundefined? Make sure you are using the data within the callback from the function. These functions return immediately and the data will not be defined outside of the callback. Once the data fetch and parsing has been done, the callback will be called. -
Are my bars one pixel wide? Check that you have set
.xUnitson your chart. The parameter should be one of thedc.unitshelpers. -
Does everything break after a call to
.xAxis??xAxisreturns an axis object which is not the chart.