better table: default sort + % sign

This commit is contained in:
Maximilian Keßler 2023-12-25 01:41:21 +01:00
parent 052a9142eb
commit 1c1d9664bd
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -115,16 +115,20 @@ var table_{{div_id}} = new Tabulator("#table-{{div_id}}", {
urlPrefix: "/player/",
}},
{title: "No Variant", headerHozAlign: "center", columns: [
{title: "ELO", field: "novar_rating"},
{title: "Games", field: "novar_games_played"},
{title: "Win%", field: "novar_winrate"},
{title: "Max Streak", field: "novar_max_streak"},
{title: "ELO", field: "novar_rating", headerSortStartingDir: "desc"},
{title: "Games", field: "novar_games_played", headerSortStartingDir: "desc"},
{title: "Win%", field: "novar_winrate", headerSortStartingDir: "desc", formatter:function(cell, formatterParams, onRendered) {
return cell.getValue() + "%";
}},
{title: "Max Streak", field: "novar_max_streak", headerSortStartingDir: "desc"},
]},
{title: "Clue Starved", headerHozAlign: "center", columns: [
{title: "ELO", field: "cs_rating"},
{title: "Games", field: "cs_games_played"},
{title: "Win%", field: "cs_winrate"},
{title: "Max Streak", field: "cs_max_streak"}
{title: "ELO", field: "cs_rating", headerSortStartingDir: "desc"},
{title: "Games", field: "cs_games_played", headerSortStartingDir: "desc"},
{title: "Win%", field: "cs_winrate", headerSortStartingDir: "desc", formatter:function(cell, formatterParams, onRendered) {
return cell.getValue() + "%";
}},
{title: "Max Streak", field: "cs_max_streak", headerSortStartingDir: "desc"}
]},
]
});