Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Fixed bar chart rendering issue.

Mike Cao3f657d97b26d
diff --git a/src/components/metrics/BarChart.tsx b/src/components/metrics/BarChart.tsx
index 8bb3a7a7f..6d28dc201 100644
--- a/src/components/metrics/BarChart.tsx
+++ b/src/components/metrics/BarChart.tsx
@@ -127,10 +127,9 @@ export function BarChart({
data: {
datasets,
},
+ options: getOptions() as any,
});
- chart.current.options = getOptions();
-
onCreate?.(chart.current);
};
@@ -160,7 +159,7 @@ export function BarChart({
}, [datasets, unit, theme, animationDuration, locale]);
return (
- <div className={styles.container}>
+ <>
<div className={classNames(styles.chart, className)}>
{isLoading && <Loading position="page" icon="dots" />}
<canvas ref={canvas} />
@@ -171,7 +170,7 @@ export function BarChart({
<div className={styles.tooltip}>{tooltip}</div>
</HoverTooltip>
)}
- </div>
+ </>
);
}