diff --git a/public/app/features/panel/state/actions.ts b/public/app/features/panel/state/actions.ts index c326cf812ae..6bde8fc0480 100644 --- a/public/app/features/panel/state/actions.ts +++ b/public/app/features/panel/state/actions.ts @@ -17,6 +17,13 @@ export function initPanelState(panel: PanelModel): ThunkResult> { return; } + // Some old panels, somehow have maxDataPoints value as string. + // This is causing problems on the backend-side. + // Here we make sure maxDataPoints is always as number. + if (panel.maxDataPoints) { + panel.maxDataPoints = Number(panel.maxDataPoints); + } + let pluginToLoad = panel.type; let plugin = getStore().plugins.panels[pluginToLoad];