fix: remove tooltip on chart cleanup (#4044)

This commit is contained in:
Yunus M 2023-11-23 16:35:44 +05:30 committed by GitHub
parent 4009ac83fe
commit 40090aaf12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,6 +57,13 @@ const Uplot = forwardRef<ToggleGraphProps | undefined, UplotProps>(
chart.destroy();
chartRef.current = null;
}
// remove chart tooltip on cleanup
const overlay = document.getElementById('overlay');
if (overlay) {
overlay.style.display = 'none';
}
}, []);
const create = useCallback(() => {