From: gregor herrmann Date: Wed, 8 Aug 2018 22:58:26 +0000 (+0200) Subject: js: play with ordering. this all doesn't seem to work with timeseries charts. X-Git-Url: https://git.toastfreeware.priv.at/chrisu/seepark.git/commitdiff_plain/cdfe54ab072113e4078b85943536df721005c64b js: play with ordering. this all doesn't seem to work with timeseries charts. --- diff --git a/web/static/seepark_web.js b/web/static/seepark_web.js index 51bfc70..a9d4756 100644 --- a/web/static/seepark_web.js +++ b/web/static/seepark_web.js @@ -22,7 +22,18 @@ function dayschart(element, title, days, xtickformat) { '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 = {