diff --git a/public/elotracker/chart-integration.js b/public/elotracker/chart-integration.js index 2acb58d..e01d7f5 100644 --- a/public/elotracker/chart-integration.js +++ b/public/elotracker/chart-integration.js @@ -16,12 +16,12 @@ const x_scale = { ticks: { callback: (value, index, ticks) => { let tickdate = new Date(value); - if (index === 0) return `${tickdate.getDate()}.${tickdate.getMonth() + 1}.`; + if (index === 0) return `${tickdate.getDate()}.${month_names[tickdate.getMonth()]}`; let prev_tickdate = new Date(ticks[index-1].value); if (prev_tickdate.getDate() === tickdate.getDate()) { return null; } - return `${tickdate.getDate()}.${tickdate.getMonth() + 1}.`; + return `${tickdate.getDate()}.${month_names[tickdate.getMonth()]}`; } } } @@ -345,6 +345,7 @@ function format_time_minsec(date) { } return min + trenner + nullausgleich + date.getSeconds() + format; } +const month_names = ["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"]; async function update_leaderboard_elements() { fetch(`./leaderboard_list.php`, {