From b804f7db038e2d0322cc7db944b0fe16774fdd32 Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Tue, 28 Jun 2022 14:31:08 +0530 Subject: [PATCH] Reset the zoom before destroying the chart. --- web/pgadmin/static/js/chartjs/index.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/web/pgadmin/static/js/chartjs/index.jsx b/web/pgadmin/static/js/chartjs/index.jsx index ed3b63515..a9057091e 100644 --- a/web/pgadmin/static/js/chartjs/index.jsx +++ b/web/pgadmin/static/js/chartjs/index.jsx @@ -102,6 +102,7 @@ export default function BaseChart({type='line', id, options, data, redraw=false, }; const destroyChart = function() { + chartObj.current?.resetZoom?.(); chartObj.current && chartObj.current.destroy(); };