mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 23:57:12 +01:00
Fixed issue with hover tooltips.
This commit is contained in:
parent
2b13002f1b
commit
ab0838e272
20 changed files with 50 additions and 91 deletions
|
|
@ -39,7 +39,7 @@ export function ReportHeader({ icon }) {
|
|||
};
|
||||
|
||||
const handleNameChange = name => {
|
||||
updateReport({ name });
|
||||
updateReport({ name: name || 'Untitled' });
|
||||
};
|
||||
|
||||
const handleDescriptionChange = description => {
|
||||
|
|
|
|||
|
|
@ -21,15 +21,15 @@ export function FunnelChart({ className, loading }) {
|
|||
[parameters],
|
||||
);
|
||||
|
||||
const renderTooltip = useCallback((setTooltip, model) => {
|
||||
const renderTooltipPopup = useCallback((setTooltipPopup, model) => {
|
||||
const { opacity, dataPoints } = model.tooltip;
|
||||
|
||||
if (!dataPoints?.length || !opacity) {
|
||||
setTooltip(null);
|
||||
setTooltipPopup(null);
|
||||
return;
|
||||
}
|
||||
|
||||
setTooltip(`${formatLongNumber(dataPoints[0].raw.y)} ${formatMessage(labels.visitors)}`);
|
||||
setTooltipPopup(`${formatLongNumber(dataPoints[0].raw.y)} ${formatMessage(labels.visitors)}`);
|
||||
}, []);
|
||||
|
||||
const datasets = useMemo(() => {
|
||||
|
|
@ -54,7 +54,7 @@ export function FunnelChart({ className, loading }) {
|
|||
unit="day"
|
||||
loading={loading}
|
||||
renderXLabel={renderXLabel}
|
||||
renderTooltip={renderTooltip}
|
||||
renderTooltipPopup={renderTooltipPopup}
|
||||
XAxisType="category"
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import {
|
|||
SubmitButton,
|
||||
Text,
|
||||
TextField,
|
||||
Tooltip,
|
||||
TooltipPopup,
|
||||
} from 'react-basics';
|
||||
import Icons from 'components/icons';
|
||||
import UrlAddForm from './UrlAddForm';
|
||||
|
|
@ -62,7 +62,7 @@ export function FunnelParameters() {
|
|||
return (
|
||||
<div key={index} className={styles.url}>
|
||||
<Text>{url}</Text>
|
||||
<Tooltip
|
||||
<TooltipPopup
|
||||
className={styles.icon}
|
||||
label={formatMessage(labels.remove)}
|
||||
position="right"
|
||||
|
|
@ -70,7 +70,7 @@ export function FunnelParameters() {
|
|||
<Icon onClick={handleRemoveUrl.bind(null, index)}>
|
||||
<Icons.Close />
|
||||
</Icon>
|
||||
</Tooltip>
|
||||
</TooltipPopup>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
|
@ -90,11 +90,11 @@ function AddUrlButton({ onAdd }) {
|
|||
|
||||
return (
|
||||
<PopupTrigger>
|
||||
<Tooltip label={formatMessage(labels.addUrl)}>
|
||||
<TooltipPopup label={formatMessage(labels.addUrl)}>
|
||||
<Icon>
|
||||
<Icons.Plus />
|
||||
</Icon>
|
||||
</Tooltip>
|
||||
</TooltipPopup>
|
||||
<Popup position="bottom" alignment="start">
|
||||
{close => {
|
||||
return <UrlAddForm onSave={onAdd} onClose={close} />;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue