superset icon indicating copy to clipboard operation
superset copied to clipboard

How to sort table by timestamp by default?

Open zn19920623 opened this issue 10 years ago • 3 comments

I have created a table and add it to dashboard. But the table is always sorted by the first metric. How can I change the default sort key to timestamp?

Thx very much!

zn19920623 avatar Sep 01 '16 03:09 zn19920623

@zn19920623 you can find it in "assets/visualizations/table.js", and search by the keyword "order("desc")".

JessicaDuan avatar Jan 23 '17 08:01 JessicaDuan

Care to give more details on how to edit the code to make the table order by timestamp by default? I tried to modify the code as below but didn't work.

datatable.column(data.columns.indexOf('__timestamp')).order('asc').draw();

vnnw avatar Sep 21 '17 07:09 vnnw

Notice: this issue has been closed because it has been inactive for 213 days. Feel free to comment and request for this issue to be reopened.

mistercrunch avatar Apr 23 '18 05:04 mistercrunch