mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 13:47:15 +01:00
Refactored funnel report. Made BarChart more generic.
This commit is contained in:
parent
050cd2f5d9
commit
fb4dd75e18
24 changed files with 327 additions and 367 deletions
|
|
@ -2,7 +2,7 @@ import { useEffect, useState } from 'react';
|
|||
import { Tooltip } from 'react-basics';
|
||||
import styles from './HoverTooltip.module.css';
|
||||
|
||||
export function HoverTooltip({ tooltip }) {
|
||||
export function HoverTooltip({ children }) {
|
||||
const [position, setPosition] = useState({ x: -1000, y: -1000 });
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -18,8 +18,8 @@ export function HoverTooltip({ tooltip }) {
|
|||
}, []);
|
||||
|
||||
return (
|
||||
<div className={styles.tooltip} style={{ left: position.x, top: position.y }}>
|
||||
<Tooltip position="top" action="none" label={tooltip} />
|
||||
<div className={styles.tooltip} style={{ left: position.x, top: position.y - 16 }}>
|
||||
<Tooltip position="top" action="none" label={children} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import styles from './WorldMap.module.css';
|
|||
export function WorldMap({ data, className }) {
|
||||
const { basePath } = useRouter();
|
||||
const [tooltip, setTooltip] = useState();
|
||||
const [theme] = useTheme();
|
||||
const { theme } = useTheme();
|
||||
const colors = useMemo(
|
||||
() => ({
|
||||
baseColor: THEME_COLORS[theme].primary,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue