diff --git a/viz-lib/src/visualizations/counter/Renderer.tsx b/viz-lib/src/visualizations/counter/Renderer.tsx index 47d011ec39..461b76247d 100644 --- a/viz-lib/src/visualizations/counter/Renderer.tsx +++ b/viz-lib/src/visualizations/counter/Renderer.tsx @@ -20,7 +20,7 @@ function getCounterScale(container: any) { if (container.closest('.visualization-preview') || container.closest('.ant-tabs-tabpane')) { return "60"; } - const fontSize = 12 + container.clientHeight / 5; + const fontSize = 12 + (container.clientHeight / window.devicePixelRatio / 5); return fontSize > 60 ? "60" : fontSize.toFixed(); }