Utilizing dc.js and crossfilter, I am creating 3 rowcharts from a csv file. The first two rowcharts are simple to set up, but the third one requires a dimension that spans multiple columns in my input csv. To achieve this, I have restructured the data so that for each column needed for that row, a new duplicate row is created with that column's value placed under a new column. See the example below;
Original structure:
ID --- rowchart1 --- rowchart2 ---- rowchart3 ----- rowchart3 ----- rowchart3 -----
1
2
3
New structure:
ID --- rowchart1 --- rowchart2 ---- newRowchart3
1
2
2
2
3
3
Although I have successfully set up the rowchart with the new constructed column, I am facing issues with displaying the original counts in the other two rowcharts. Currently, there are duplicate counts in those rowcharts.
Is there a method to group by a unique ID so that it only counts unique IDs instead of counting every single row?
Thank you.