From cdfe54ab072113e4078b85943536df721005c64b Mon Sep 17 00:00:00 2001 From: gregor herrmann Date: Thu, 9 Aug 2018 00:58:26 +0200 Subject: [PATCH] js: play with ordering. this all doesn't seem to work with timeseries charts. --- web/static/seepark_web.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 = { -- 2.47.3