Timeseries: only migrage point size when configured (#30461)

This commit is contained in:
Ryan McKinley 2021-01-20 22:28:19 -08:00 committed by GitHub
parent 98406d6c42
commit 2ec4784190
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View File

@ -10,7 +10,6 @@ Object {
"fillOpacity": 50, "fillOpacity": 50,
"lineInterpolation": "stepAfter", "lineInterpolation": "stepAfter",
"lineWidth": 5, "lineWidth": 5,
"pointSize": 6,
"showPoints": "never", "showPoints": "never",
"spanNulls": true, "spanNulls": true,
}, },
@ -93,7 +92,6 @@ Object {
"gradientMode": "opacity", "gradientMode": "opacity",
"lineInterpolation": "stepAfter", "lineInterpolation": "stepAfter",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 6,
"showPoints": "never", "showPoints": "never",
"spanNulls": true, "spanNulls": true,
}, },
@ -133,7 +131,6 @@ Object {
"fillOpacity": 50, "fillOpacity": 50,
"lineInterpolation": "stepAfter", "lineInterpolation": "stepAfter",
"lineWidth": 5, "lineWidth": 5,
"pointSize": 6,
"showPoints": "never", "showPoints": "never",
"spanNulls": true, "spanNulls": true,
}, },
@ -189,7 +186,6 @@ Object {
"fill": "dash", "fill": "dash",
}, },
"lineWidth": 1, "lineWidth": 1,
"pointSize": 6,
"showPoints": "never", "showPoints": "never",
"spanNulls": true, "spanNulls": true,
}, },

View File

@ -231,6 +231,10 @@ export function flotToGraphOptions(angular: any): { fieldConfig: FieldConfigSour
if (angular.points) { if (angular.points) {
graph.showPoints = PointVisibility.Always; graph.showPoints = PointVisibility.Always;
if (isNumber(angular.pointradius)) {
graph.pointSize = 2 + angular.pointradius * 2;
}
} else if (graph.drawStyle !== DrawStyle.Points) { } else if (graph.drawStyle !== DrawStyle.Points) {
graph.showPoints = PointVisibility.Never; graph.showPoints = PointVisibility.Never;
} }
@ -240,10 +244,6 @@ export function flotToGraphOptions(angular: any): { fieldConfig: FieldConfigSour
graph.lineStyle = dash; graph.lineStyle = dash;
} }
if (isNumber(angular.pointradius)) {
graph.pointSize = 2 + angular.pointradius * 2;
}
if (hasFillBelowTo) { if (hasFillBelowTo) {
graph.fillOpacity = 35; // bands are hardcoded in flot graph.fillOpacity = 35; // bands are hardcoded in flot
} else if (isNumber(angular.fill)) { } else if (isNumber(angular.fill)) {