How to sort data in dc.js chart (like row) - Ascending x Descending
I want to reorder the chart (row/column) by specified attribute (like 'avg' -> ascending)
I'm trying to use ".top()"... but unsuccessfully
Thanks
draft below jsfiddle -> ewr5Z/2/
You can use the ordering method:
If you write a custom reduce, you can have more flexibility:
If you want the user to be able to change the sort order, you'd need to build a sort button that changes the ordering and rerenders the chart.