js: play with ordering. this all doesn't seem to work with timeseries charts.
authorgregor herrmann <gregor@toastfreeware.priv.at>
Wed, 8 Aug 2018 22:58:26 +0000 (00:58 +0200)
committergregor herrmann <gregor@toastfreeware.priv.at>
Wed, 8 Aug 2018 22:58:26 +0000 (00:58 +0200)
web/static/seepark_web.js

index 51bfc70fa4f9b47bbd8d4726e66cfd07e8ee63a2..a9d47563e26fc5549cace84cf75d8350f2af9c80 100644 (file)
@@ -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 = {