mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 14:47:14 +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
|
|
@ -27,12 +27,12 @@ export function renderDateLabels(unit, locale) {
|
|||
};
|
||||
}
|
||||
|
||||
export function renderStatusTooltip(unit, locale) {
|
||||
return (setTooltip, model) => {
|
||||
export function renderStatusTooltipPopup(unit, locale) {
|
||||
return (setTooltipPopup, model) => {
|
||||
const { opacity, labelColors, dataPoints } = model.tooltip;
|
||||
|
||||
if (!dataPoints?.length || !opacity) {
|
||||
setTooltip(null);
|
||||
setTooltipPopup(null);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ export function renderStatusTooltip(unit, locale) {
|
|||
year: 'yyyy',
|
||||
};
|
||||
|
||||
setTooltip(
|
||||
setTooltipPopup(
|
||||
<>
|
||||
<div>{dateFormat(new Date(dataPoints[0].raw.x), formats[unit], locale)}</div>
|
||||
<div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue