0
votes

I have an array of data being interpreted by dc.js into bar graphs, however every time that I create a new graph, it always has the number of instances in a group on the y-axis. I would like to know if I can change this, and run a function on each element in the group before outputting it to the screen.

2

2 Answers

0
votes

I'm not 100% clear what you are asking for, but it sounds like you may be looking for either the crossfilter custom reduce function, or the one of the tricks for pre-filtering data.

If not, please edit your question and add more details. Hope this helps.

0
votes

I found how to do it. As the other answer said, the custom reduce function is required to create the variables to be projected on the y-axis, but the real attribute that accesses the y-axis is the ".valueAccessor" attribute of dc charts.