From 3c0da30b37d61aa8ebeb2672ef64b1ce68e97112 Mon Sep 17 00:00:00 2001 From: gregor herrmann Date: Mon, 3 Sep 2018 18:02:08 +0200 Subject: [PATCH 1/1] use strftime js library that way we get german day/month names, and with a well-known formatting --- web/static/seepark_web.js | 5 ++++- web/templates/seepark_web.html | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/web/static/seepark_web.js b/web/static/seepark_web.js index c762fb0..47bd334 100644 --- a/web/static/seepark_web.js +++ b/web/static/seepark_web.js @@ -80,7 +80,10 @@ function dayschart(element, title, days, xtickformat) { x: { type: 'timeseries', tick: { - format: xtickformat, + format: function (d) { + var strftimeDE = strftime.localizeByIdentifier('de_DE'); + return strftimeDE(xtickformat, new Date(d)); + }, fit: false, multiline: true, // broken? so → rotate: -90 diff --git a/web/templates/seepark_web.html b/web/templates/seepark_web.html index 761ded9..8868950 100644 --- a/web/templates/seepark_web.html +++ b/web/templates/seepark_web.html @@ -16,9 +16,10 @@ - + + Seepark Obsteig -- 2.47.3