diff --git a/dashboard.go b/dashboard.go index 55f1bb775d..527761679d 100644 --- a/dashboard.go +++ b/dashboard.go @@ -689,6 +689,7 @@ type LinePlusSingleStatProperties struct { ShadeBelow bool `json:"shadeBelow"` Position string `json:"position"` TimeFormat string `json:"timeFormat"` + HoverDimension string `json:"hoverDimension"` } // XYViewProperties represents options for line, bar, step, or stacked view in Chronograf @@ -706,6 +707,7 @@ type XYViewProperties struct { ShadeBelow bool `json:"shadeBelow"` Position string `json:"position"` TimeFormat string `json:"timeFormat"` + HoverDimension string `json:"hoverDimension"` } // CheckViewProperties represents options for a view representing a check diff --git a/dashboard_test.go b/dashboard_test.go index 60496b703a..7fc978922e 100644 --- a/dashboard_test.go +++ b/dashboard_test.go @@ -51,8 +51,9 @@ func TestView_MarshalJSON(t *testing.T) { "xColumn": "", "yColumn": "", "shadeBelow": false, - "position": "", - "timeFormat": "" + "position": "", + "timeFormat": "", + "hoverDimension": "" } } `, diff --git a/e2e/etc/test-data/alpha_dashboard.json b/e2e/etc/test-data/alpha_dashboard.json index 6ab6ea48a6..9fa53bf2a1 100644 --- a/e2e/etc/test-data/alpha_dashboard.json +++ b/e2e/etc/test-data/alpha_dashboard.json @@ -173,7 +173,8 @@ "showNoteWhenEmpty": false, "xColumn": "_time", "yColumn": "_value", - "shadeBelow": false + "shadeBelow": false, + "hoverDimension": "auto" } } }, @@ -258,7 +259,8 @@ "showNoteWhenEmpty": false, "xColumn": "_time", "yColumn": "_value", - "shadeBelow": false + "shadeBelow": false, + "hoverDimension": "auto" } } }, diff --git a/e2e/etc/test-data/hydro-test-template.json b/e2e/etc/test-data/hydro-test-template.json index cb6c0c3388..a108d2887c 100644 --- a/e2e/etc/test-data/hydro-test-template.json +++ b/e2e/etc/test-data/hydro-test-template.json @@ -147,6 +147,7 @@ } ], "shadeBelow": false, + "hoverDimension": "auto", "shape": "chronograf-v2", "showNoteWhenEmpty": false, "type": "xy", diff --git a/e2e/etc/test-data/sine-test-template.json b/e2e/etc/test-data/sine-test-template.json index 6a1b93f7f3..e8ed8b6cda 100644 --- a/e2e/etc/test-data/sine-test-template.json +++ b/e2e/etc/test-data/sine-test-template.json @@ -151,7 +151,8 @@ "showNoteWhenEmpty": false, "xColumn": "_time", "yColumn": "_value", - "shadeBelow": false + "shadeBelow": false, + "hoverDimension": "auto" } } }, diff --git a/e2e/etc/test-data/tau_ceti_dashboard.json b/e2e/etc/test-data/tau_ceti_dashboard.json index 50c98a156e..efbc58b599 100644 --- a/e2e/etc/test-data/tau_ceti_dashboard.json +++ b/e2e/etc/test-data/tau_ceti_dashboard.json @@ -173,7 +173,8 @@ "showNoteWhenEmpty": false, "xColumn": "_time", "yColumn": "_value", - "shadeBelow": false + "shadeBelow": false, + "hoverDimension": "auto" } } }, @@ -258,7 +259,8 @@ "showNoteWhenEmpty": false, "xColumn": "_time", "yColumn": "_value", - "shadeBelow": false + "shadeBelow": false, + "hoverDimension": "auto" } } }, diff --git a/http/dashboard_test.go b/http/dashboard_test.go index 45344e2e7c..2afbb5d3ec 100644 --- a/http/dashboard_test.go +++ b/http/dashboard_test.go @@ -461,6 +461,7 @@ func TestService_handleGetDashboard(t *testing.T) { "note": "", "queries": null, "shadeBelow": false, + "hoverDimension": "", "showNoteWhenEmpty": false, "timeFormat": "", "type": "xy", @@ -977,6 +978,7 @@ func TestService_handlePostDashboard(t *testing.T) { "position": "", "queries": null, "shadeBelow": false, + "hoverDimension": "", "showNoteWhenEmpty": false, "timeFormat": "", "type": "", diff --git a/http/swagger.yml b/http/swagger.yml index ab42dee23c..7c1a598385 100644 --- a/http/swagger.yml +++ b/http/swagger.yml @@ -9154,6 +9154,9 @@ components: type: string shadeBelow: type: boolean + hoverDimension: + type: string + enum: [auto, x, y, xy] position: type: string enum: [overlaid, stacked] @@ -9210,6 +9213,9 @@ components: type: string shadeBelow: type: boolean + hoverDimension: + type: string + enum: [auto, x, y, xy] position: type: string enum: [overlaid, stacked]