Skip to content

Commit 42167a6

Browse files
committed
testdata(): added test graph for null stacking scenario, grafana#6566
1 parent f52c6aa commit 42167a6

File tree

2 files changed

+235
-52
lines changed

2 files changed

+235
-52
lines changed

public/app/plugins/app/testdata/dashboards/graph_last_1h.json

Lines changed: 234 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,54 @@
11
{
2-
"revision": 5,
2+
"revision": 6,
33
"title": "TestData - Graph Panel Last 1h",
44
"tags": [
55
"grafana-test"
66
],
77
"style": "dark",
88
"timezone": "browser",
99
"editable": true,
10-
"hideControls": false,
1110
"sharedCrosshair": false,
11+
"hideControls": false,
12+
"time": {
13+
"from": "2016-11-16T16:59:38.294Z",
14+
"to": "2016-11-16T17:09:01.532Z"
15+
},
16+
"timepicker": {
17+
"refresh_intervals": [
18+
"5s",
19+
"10s",
20+
"30s",
21+
"1m",
22+
"5m",
23+
"15m",
24+
"30m",
25+
"1h",
26+
"2h",
27+
"1d"
28+
],
29+
"time_options": [
30+
"5m",
31+
"15m",
32+
"1h",
33+
"6h",
34+
"12h",
35+
"24h",
36+
"2d",
37+
"7d",
38+
"30d"
39+
]
40+
},
41+
"templating": {
42+
"list": []
43+
},
44+
"annotations": {
45+
"list": []
46+
},
47+
"refresh": false,
48+
"schemaVersion": 13,
49+
"version": 4,
50+
"links": [],
51+
"gnetId": null,
1252
"rows": [
1353
{
1454
"collapse": false,
@@ -238,7 +278,13 @@
238278
]
239279
}
240280
],
241-
"title": "New row"
281+
"title": "New row",
282+
"showTitle": false,
283+
"titleSize": "h6",
284+
"isNew": false,
285+
"repeat": null,
286+
"repeatRowId": null,
287+
"repeatIteration": null
242288
},
243289
{
244290
"collapse": false,
@@ -332,7 +378,13 @@
332378
"type": "text"
333379
}
334380
],
335-
"title": "New row"
381+
"title": "New row",
382+
"showTitle": false,
383+
"titleSize": "h6",
384+
"isNew": false,
385+
"repeat": null,
386+
"repeatRowId": null,
387+
"repeatIteration": null
336388
},
337389
{
338390
"collapse": false,
@@ -371,7 +423,7 @@
371423
"yaxis": 2
372424
}
373425
],
374-
"span": 7.99561403508772,
426+
"span": 8,
375427
"stack": false,
376428
"steppedLine": false,
377429
"targets": [
@@ -432,12 +484,18 @@
432484
"isNew": true,
433485
"links": [],
434486
"mode": "markdown",
435-
"span": 4.00438596491228,
487+
"span": 4,
436488
"title": "",
437489
"type": "text"
438490
}
439491
],
440-
"title": "New row"
492+
"title": "New row",
493+
"showTitle": false,
494+
"titleSize": "h6",
495+
"isNew": false,
496+
"repeat": null,
497+
"repeatRowId": null,
498+
"repeatIteration": null
441499
},
442500
{
443501
"collapse": false,
@@ -545,7 +603,7 @@
545603
"points": false,
546604
"renderer": "flot",
547605
"seriesOverrides": [],
548-
"span": 3,
606+
"span": 4,
549607
"stack": false,
550608
"steppedLine": false,
551609
"targets": [
@@ -592,6 +650,31 @@
592650
}
593651
]
594652
},
653+
{
654+
"content": "Should be a long line connecting the null region in the `connected` mode, and in zero it should just be a line with zero value at the null points. ",
655+
"editable": true,
656+
"error": false,
657+
"id": 13,
658+
"isNew": true,
659+
"links": [],
660+
"mode": "markdown",
661+
"span": 4,
662+
"title": "",
663+
"type": "text"
664+
}
665+
],
666+
"title": "New row",
667+
"showTitle": false,
668+
"titleSize": "h6",
669+
"isNew": false,
670+
"repeat": null,
671+
"repeatRowId": null,
672+
"repeatIteration": null
673+
},
674+
{
675+
"isNew": false,
676+
"title": "Dashboard Row",
677+
"panels": [
595678
{
596679
"aliasColors": {},
597680
"bars": false,
@@ -624,7 +707,7 @@
624707
"zindex": -3
625708
}
626709
],
627-
"span": 5,
710+
"span": 8,
628711
"stack": true,
629712
"steppedLine": false,
630713
"targets": [
@@ -687,49 +770,149 @@
687770
"show": true
688771
}
689772
]
773+
},
774+
{
775+
"content": "Stacking values on top of nulls, should treat the null values as zero. ",
776+
"editable": true,
777+
"error": false,
778+
"id": 14,
779+
"isNew": true,
780+
"links": [],
781+
"mode": "markdown",
782+
"span": 4,
783+
"title": "",
784+
"type": "text"
690785
}
691786
],
692-
"title": "New row"
787+
"showTitle": false,
788+
"titleSize": "h6",
789+
"height": 250,
790+
"repeat": null,
791+
"repeatRowId": null,
792+
"repeatIteration": null,
793+
"collapse": false
794+
},
795+
{
796+
"isNew": false,
797+
"title": "Dashboard Row",
798+
"panels": [
799+
{
800+
"aliasColors": {},
801+
"bars": false,
802+
"datasource": "Grafana TestData",
803+
"editable": true,
804+
"error": false,
805+
"fill": 1,
806+
"id": 12,
807+
"isNew": true,
808+
"legend": {
809+
"avg": false,
810+
"current": false,
811+
"max": false,
812+
"min": false,
813+
"show": true,
814+
"total": false,
815+
"values": false
816+
},
817+
"lines": true,
818+
"linewidth": 2,
819+
"links": [],
820+
"nullPointMode": "null",
821+
"percentage": false,
822+
"pointradius": 5,
823+
"points": false,
824+
"renderer": "flot",
825+
"seriesOverrides": [
826+
{
827+
"alias": "B-series",
828+
"zindex": -3
829+
}
830+
],
831+
"span": 8,
832+
"stack": true,
833+
"steppedLine": false,
834+
"targets": [
835+
{
836+
"hide": false,
837+
"refId": "B",
838+
"scenarioId": "csv_metric_values",
839+
"stringInput": "1,20,40,null,null,null,null,null,null,100,10,10,20,30,40,10",
840+
"target": "",
841+
"alias": ""
842+
},
843+
{
844+
"alias": "",
845+
"hide": false,
846+
"refId": "A",
847+
"scenarioId": "csv_metric_values",
848+
"stringInput": "1,20,40,null,null,null,null,null,null,100,10,10,20,30,40,10",
849+
"target": ""
850+
},
851+
{
852+
"alias": "",
853+
"hide": false,
854+
"refId": "C",
855+
"scenarioId": "csv_metric_values",
856+
"stringInput": "1,20,40,null,null,null,null,null,null,100,10,10,20,30,40,10",
857+
"target": ""
858+
}
859+
],
860+
"thresholds": [],
861+
"timeFrom": null,
862+
"timeShift": null,
863+
"title": "Stacking all series null segment",
864+
"tooltip": {
865+
"msResolution": false,
866+
"shared": true,
867+
"sort": 0,
868+
"value_type": "cumulative"
869+
},
870+
"type": "graph",
871+
"xaxis": {
872+
"mode": "time",
873+
"name": null,
874+
"show": true,
875+
"values": []
876+
},
877+
"yaxes": [
878+
{
879+
"format": "short",
880+
"label": null,
881+
"logBase": 1,
882+
"max": null,
883+
"min": null,
884+
"show": true
885+
},
886+
{
887+
"format": "short",
888+
"label": null,
889+
"logBase": 1,
890+
"max": null,
891+
"min": null,
892+
"show": true
893+
}
894+
]
895+
},
896+
{
897+
"content": "Stacking when all values are null should leave a gap in the graph",
898+
"editable": true,
899+
"error": false,
900+
"id": 15,
901+
"isNew": true,
902+
"links": [],
903+
"mode": "markdown",
904+
"span": 4,
905+
"title": "",
906+
"type": "text"
907+
}
908+
],
909+
"showTitle": false,
910+
"titleSize": "h6",
911+
"height": 250,
912+
"repeat": null,
913+
"repeatRowId": null,
914+
"repeatIteration": null,
915+
"collapse": false
693916
}
694-
],
695-
"time": {
696-
"from": "now-1h",
697-
"to": "now"
698-
},
699-
"timepicker": {
700-
"refresh_intervals": [
701-
"5s",
702-
"10s",
703-
"30s",
704-
"1m",
705-
"5m",
706-
"15m",
707-
"30m",
708-
"1h",
709-
"2h",
710-
"1d"
711-
],
712-
"time_options": [
713-
"5m",
714-
"15m",
715-
"1h",
716-
"6h",
717-
"12h",
718-
"24h",
719-
"2d",
720-
"7d",
721-
"30d"
722-
]
723-
},
724-
"templating": {
725-
"list": []
726-
},
727-
"annotations": {
728-
"list": []
729-
},
730-
"refresh": false,
731-
"schemaVersion": 13,
732-
"version": 13,
733-
"links": [],
734-
"gnetId": null
917+
]
735918
}

public/app/plugins/app/testdata/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "Grafana Project",
1010
"url": "http://grafana.org"
1111
},
12-
"version": "1.0.14",
12+
"version": "1.0.15",
1313
"updated": "2016-09-26"
1414
},
1515

0 commit comments

Comments
 (0)