Is there a way to change the date format on the x-axis of the Analyse Charts?
At the moment it seems to be formatted month-day
, which is awfully American…
I wondered whether it had something to do with Regional Settings, but these are correct for my area, where we would usually use day-month-year
1 Like
hpuk2000
(Chris Bourne)
February 25, 2021, 4:44pm
2
Did you ever find a fix for this ?
Nope, but then I’m still on OH2 for my production system so I haven’t tried looking any further…
hpuk2000
(Chris Bourne)
February 25, 2021, 5:07pm
4
Thanks.
I’m doing exactly the same.
It’s a steep but interesting learning curve after always using config files for everything.
If I find an answer I’ll post it here.
1 Like
opus
(Jürgen Baginski)
February 25, 2021, 5:33pm
5
I’m on OH3 (Snapshot #2206 ) and my analysis chart looks like that:
I’m using a German language setting, changing it to UK English didn’t show to date as in the OP either.
Strange. I’m on the 3.0.1 Release Build.
runtimeInfo:
version: 3.0.1
buildString: Release Build
locale: en_GB
Analyse charts still have US date formatting.
If I run locale
in a terminal on my OH3 device:
LANG=en_GB.UTF-8
LANGUAGE=en_GB:en
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
Which all seems correct? Not sure what else to look at.
ubeaut
(Greg)
March 10, 2021, 3:58am
7
Not many countries use month-day format.
Why not use ISO format?
Or better still pick up the format from the machine openhab is running on and then everyone would be happy.
rossko57
(Rossko57)
March 10, 2021, 10:04am
8
Comment - related locale issue
Does anyone know how to change the number format from US to German in the OH3 Chart? Example:
I would like to have a “comma” as separator for the value in the chart:
[grafik]
[grafik]
Also the values in the y-axis are shown in the us-number format:
[grafik]
[grafik]
1 Like
Looks like we have an answer for the moment: no, this can’t be changed.
ECharts doesn’t seem to play nice with locales & number formats (it can be passed a locale but it’s only for some text translations apparently), while it’s still possible to define formatter functions for everything, since they’re functions, it’s a no-no in YAML. So for now… no.