mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 09:35:36 +01:00
Updated grid layouts. Fixed chart tooltip.
This commit is contained in:
parent
96c2c32d14
commit
1d24e23a34
9 changed files with 64 additions and 79 deletions
|
|
@ -82,19 +82,19 @@ export function BarChart(props: BarChartProps) {
|
|||
const handleTooltip = ({ tooltip }: { tooltip: any }) => {
|
||||
const { opacity } = tooltip;
|
||||
|
||||
setTooltip(
|
||||
opacity ? <BarChartTooltip tooltip={tooltip} unit={unit} currency={currency} /> : null,
|
||||
);
|
||||
setTooltip(opacity ? tooltip : null);
|
||||
};
|
||||
|
||||
return (
|
||||
<Chart
|
||||
{...props}
|
||||
type="bar"
|
||||
chartOptions={options}
|
||||
tooltip={tooltip}
|
||||
onTooltip={handleTooltip}
|
||||
style={{ height: 400 }}
|
||||
/>
|
||||
<>
|
||||
<Chart
|
||||
{...props}
|
||||
type="bar"
|
||||
chartOptions={options}
|
||||
onTooltip={handleTooltip}
|
||||
style={{ height: 400 }}
|
||||
/>
|
||||
{tooltip && <BarChartTooltip tooltip={tooltip} unit={unit} currency={currency} />}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue