X-Git-Url: https://git.toastfreeware.priv.at/chrisu/seepark.git/blobdiff_plain/5ded0a74693c3e1f738adc9338a09fd53a1bcab0..2c03ac89e22ed7483b97b99bb45242c58a0fc637:/web/static/seepark_web.js?ds=sidebyside diff --git a/web/static/seepark_web.js b/web/static/seepark_web.js index 51bfc70..2944e90 100644 --- a/web/static/seepark_web.js +++ b/web/static/seepark_web.js @@ -13,16 +13,27 @@ function dayschart(element, title, days, xtickformat) { '0416a1bab9ff': '0416a1bab9ff_x' }, names: { - '0416a1ac66ff': 'Wassertemperatur in 30 cm Tiefe', - '0516a207a4ff': 'Wassertemperatur in 50 cm Tiefe', - '0416a1bab9ff': 'Wassertemperatur in 1 m Tiefe' + '0416a1ac66ff': 'Wassertemperatur 30cm Tiefe', + '0516a207a4ff': 'Wassertemperatur 50cm Tiefe', + '0416a1bab9ff': 'Wassertemperatur 1m Tiefe' }, xFormat: '%Y-%m-%d %H:%M:%S', colors: { '0416a1ac66ff': 'lightskyblue', '0516a207a4ff': 'royalblue', '0416a1bab9ff': 'midnightblue' + }, + /* + xSort: false, + order: function (a, b) { + // gets 2 x objects. seems to be a "sort function" for js's sort() + // -1: a before b etc. + // only handle cases that appear in the wild + // console.log("a.id", a.id, "b.id", b.id); + if (a.id == '0416a1ac66ff') {return -1}; + if (a.id == '0416a1bab9ff') {return 1}; } + */ }; } else { chartdata = { @@ -98,7 +109,7 @@ function dayschart(element, title, days, xtickformat) { name: function (name, ratio, id, index) { var prefix = ''; if (element.substr(0, 7) == 'chart_w') { - var re = /\d+ c?m/; + var re = /\d+ ?c?m/; prefix = 'Wasser '; } else { var re = /Luft/;