Skip to content

Commit

Permalink
Removing old sort
Browse files Browse the repository at this point in the history
  • Loading branch information
michellethomas committed Oct 11, 2017
1 parent a9a751b commit add2a9d
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions superset/assets/visualizations/time_table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,7 @@ function viz(slice, payload) {
metricMap[m.metric_name] = m;
});

let metrics;
if (payload.data.is_group_by) {
// Sorting by first column desc
metrics = payload.data.columns.sort((m1, m2) => (
reversedData[0][m1] > reversedData[0][m2] ? -1 : 1
));
} else {
// Using ordering specified in Metrics dropdown
metrics = payload.data.columns;
}
const metrics = payload.data.columns;
const defaultSort = { column: fd.column_collection[0].key, direction: 'desc' };
const tableData = metrics.map((metric) => {
let leftCell;
Expand Down

0 comments on commit add2a9d

Please sign in to comment.