Hi there!
I am trying to sort the columns based on one of the Task fields (specifically, the column on index[0]), and I have the following code:
gantt.config.sort = true;
gantt.attachEvent('onGanttRender', function() {
console.log('sorting');
gantt.config.columns[0].sort = true;
});
However, when the chart is rendered, the columns are not sorted. I am also trying something like this:
gantt.attachEvent('onGanttRender', function() {
gantt.config.columns[0].sort = function(a,b){
console.log('sorting...')
};
});
but in that case, I don’t even get to see sorting...
in the console.
Any ideas how to do this? Thank you guys!