Browse Source

Add cumulative graph

master
Micke Nordin 1 year ago
parent
commit
3e5a9f35b0
1 changed files with 168 additions and 6 deletions
  1. 168
    6
      grafana_dashboard.json

+ 168
- 6
grafana_dashboard.json View File

@@ -16,7 +16,7 @@
16 16
   "gnetId": null,
17 17
   "graphTooltip": 0,
18 18
   "id": 1,
19
-  "iteration": 1590249347291,
19
+  "iteration": 1590414938713,
20 20
   "links": [],
21 21
   "panels": [
22 22
     {
@@ -251,6 +251,7 @@
251 251
       "timeFrom": null,
252 252
       "timeShift": null,
253 253
       "title": "Current wind direction",
254
+      "transparent": true,
254 255
       "type": "gauge"
255 256
     },
256 257
     {
@@ -285,11 +286,11 @@
285 286
       "gridPos": {
286 287
         "h": 8,
287 288
         "w": 12,
288
-        "x": 6,
289
+        "x": 0,
289 290
         "y": 8
290 291
       },
291 292
       "hiddenSeries": false,
292
-      "id": 11,
293
+      "id": 12,
293 294
       "interval": "1h",
294 295
       "legend": {
295 296
         "avg": false,
@@ -384,6 +385,167 @@
384 385
         "alignLevel": null
385 386
       }
386 387
     },
388
+    {
389
+      "aliasColors": {
390
+        "ETo": "dark-orange",
391
+        "Rainfall": "dark-blue"
392
+      },
393
+      "bars": false,
394
+      "dashLength": 10,
395
+      "dashes": false,
396
+      "datasource": null,
397
+      "description": "",
398
+      "fieldConfig": {
399
+        "defaults": {
400
+          "custom": {},
401
+          "mappings": [],
402
+          "thresholds": {
403
+            "mode": "absolute",
404
+            "steps": [
405
+              {
406
+                "color": "green",
407
+                "value": null
408
+              },
409
+              {
410
+                "color": "red",
411
+                "value": 80
412
+              }
413
+            ]
414
+          },
415
+          "unit": "lengthmm"
416
+        },
417
+        "overrides": []
418
+      },
419
+      "fill": 1,
420
+      "fillGradient": 0,
421
+      "gridPos": {
422
+        "h": 8,
423
+        "w": 12,
424
+        "x": 12,
425
+        "y": 8
426
+      },
427
+      "hiddenSeries": false,
428
+      "id": 11,
429
+      "interval": "1h",
430
+      "legend": {
431
+        "avg": false,
432
+        "current": false,
433
+        "max": false,
434
+        "min": false,
435
+        "show": true,
436
+        "total": false,
437
+        "values": false
438
+      },
439
+      "lines": true,
440
+      "linewidth": 1,
441
+      "nullPointMode": "null",
442
+      "options": {
443
+        "dataLinks": []
444
+      },
445
+      "percentage": false,
446
+      "pluginVersion": "7.0.0",
447
+      "pointradius": 2,
448
+      "points": false,
449
+      "renderer": "flot",
450
+      "seriesOverrides": [],
451
+      "spaceLength": 10,
452
+      "stack": false,
453
+      "steppedLine": false,
454
+      "targets": [
455
+        {
456
+          "format": "time_series",
457
+          "group": [],
458
+          "metricColumn": "none",
459
+          "rawQuery": true,
460
+          "rawSql": "with data as (\n  select\n    date as time,\n    rainfall\n  from aggregated_weather where $__timeFilter(date) and station_name = \"$Station\"\n  group by time\n) select time, sum(rainfall) over (order by time) as Rainfall from data;\n",
461
+          "refId": "A",
462
+          "select": [
463
+            [
464
+              {
465
+                "params": [
466
+                  "value"
467
+                ],
468
+                "type": "column"
469
+              }
470
+            ]
471
+          ],
472
+          "timeColumn": "time",
473
+          "where": [
474
+            {
475
+              "name": "$__timeFilter",
476
+              "params": [],
477
+              "type": "macro"
478
+            }
479
+          ]
480
+        },
481
+        {
482
+          "format": "time_series",
483
+          "group": [],
484
+          "metricColumn": "none",
485
+          "rawQuery": true,
486
+          "rawSql": "with data as (\n  select\n    date as time,\n    ETo\n  from aggregated_weather where $__timeFilter(date) and station_name = \"$Station\"\n  group by time\n) select time, sum(ETo) over (order by time) as ETo from data;",
487
+          "refId": "B",
488
+          "select": [
489
+            [
490
+              {
491
+                "params": [
492
+                  "value"
493
+                ],
494
+                "type": "column"
495
+              }
496
+            ]
497
+          ],
498
+          "timeColumn": "time",
499
+          "where": [
500
+            {
501
+              "name": "$__timeFilter",
502
+              "params": [],
503
+              "type": "macro"
504
+            }
505
+          ]
506
+        }
507
+      ],
508
+      "thresholds": [],
509
+      "timeFrom": null,
510
+      "timeRegions": [],
511
+      "timeShift": null,
512
+      "title": "Cumulative rainfall and evapotranspiration",
513
+      "tooltip": {
514
+        "shared": true,
515
+        "sort": 0,
516
+        "value_type": "individual"
517
+      },
518
+      "type": "graph",
519
+      "xaxis": {
520
+        "buckets": null,
521
+        "mode": "time",
522
+        "name": null,
523
+        "show": true,
524
+        "values": []
525
+      },
526
+      "yaxes": [
527
+        {
528
+          "format": "lengthmm",
529
+          "label": null,
530
+          "logBase": 1,
531
+          "max": null,
532
+          "min": null,
533
+          "show": true
534
+        },
535
+        {
536
+          "format": "short",
537
+          "label": null,
538
+          "logBase": 1,
539
+          "max": null,
540
+          "min": null,
541
+          "show": true
542
+        }
543
+      ],
544
+      "yaxis": {
545
+        "align": false,
546
+        "alignLevel": null
547
+      }
548
+    },
387 549
     {
388 550
       "aliasColors": {
389 551
         "Difference": "dark-purple",
@@ -491,7 +653,7 @@
491 653
       "timeFrom": null,
492 654
       "timeRegions": [],
493 655
       "timeShift": null,
494
-      "title": "Rainfall vs Evapotranspiration",
656
+      "title": "Daily rainfall vs Evapotranspiration",
495 657
       "tooltip": {
496 658
         "shared": true,
497 659
         "sort": 0,
@@ -880,7 +1042,7 @@
880 1042
     ]
881 1043
   },
882 1044
   "time": {
883
-    "from": "now/y",
1045
+    "from": "now-6M",
884 1046
     "to": "now"
885 1047
   },
886 1048
   "timepicker": {
@@ -899,5 +1061,5 @@
899 1061
   "timezone": "",
900 1062
   "title": "Weather",
901 1063
   "uid": "jMywAWkGz",
902
-  "version": 21
1064
+  "version": 23
903 1065
 }

Loading…
Cancel
Save