mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 21:27:20 +01:00
Fix tooltip label, retention report for mysql, pass minDate into eventsChart
This commit is contained in:
parent
a5e2242486
commit
ab050e51c5
4 changed files with 14 additions and 13 deletions
|
|
@ -1,9 +1,8 @@
|
|||
import { useMemo } from 'react';
|
||||
import { useTheme } from 'components/hooks';
|
||||
import Chart, { ChartProps } from 'components/charts/Chart';
|
||||
import { renderNumberLabels } from 'lib/charts';
|
||||
import { useState } from 'react';
|
||||
import BarChartTooltip from 'components/charts/BarChartTooltip';
|
||||
import Chart, { ChartProps } from 'components/charts/Chart';
|
||||
import { useTheme } from 'components/hooks';
|
||||
import { renderNumberLabels } from 'lib/charts';
|
||||
import { useMemo, useState } from 'react';
|
||||
|
||||
export interface BarChartProps extends ChartProps {
|
||||
unit: string;
|
||||
|
|
@ -36,7 +35,7 @@ export function BarChart(props: BarChartProps) {
|
|||
x: {
|
||||
type: XAxisType,
|
||||
stacked: true,
|
||||
min: unit === 'year' ? '' : minDate,
|
||||
min: minDate && new Date(minDate).getSeconds() === 0 ? minDate : '',
|
||||
max: maxDate,
|
||||
time: {
|
||||
unit,
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ export function EventsChart({ websiteId, className }: EventsChartProps) {
|
|||
|
||||
return (
|
||||
<BarChart
|
||||
minDate={startDate.toISOString()}
|
||||
maxDate={endDate.toISOString()}
|
||||
className={className}
|
||||
data={chartData}
|
||||
unit={unit}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue