mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 08:07:12 +01:00
Added metrics bar and date range to sessions.
This commit is contained in:
parent
36663bd52d
commit
b9068c0050
44 changed files with 859 additions and 739 deletions
|
|
@ -2,7 +2,7 @@ import { useMemo } from 'react';
|
|||
import { colord } from 'colord';
|
||||
import BarChart from 'components/charts/BarChart';
|
||||
import { getDateArray } from 'lib/date';
|
||||
import { useLocale, useDateRange, useWebsiteEvents } from 'components/hooks';
|
||||
import { useLocale, useDateRange, useWebsiteEventsSeries } from 'components/hooks';
|
||||
import { CHART_COLORS } from 'lib/constants';
|
||||
import { renderDateLabels } from 'lib/charts';
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ export function EventsChart({ websiteId, className }: EventsChartProps) {
|
|||
dateRange: { startDate, endDate, unit },
|
||||
} = useDateRange(websiteId);
|
||||
const { locale } = useLocale();
|
||||
const { data, isLoading } = useWebsiteEvents(websiteId);
|
||||
const { data, isLoading } = useWebsiteEventsSeries(websiteId);
|
||||
|
||||
const chartData = useMemo(() => {
|
||||
if (!data) return [];
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export interface MetricCardProps {
|
|||
change?: number;
|
||||
label?: string;
|
||||
reverseColors?: boolean;
|
||||
formatValue?: typeof formatNumber;
|
||||
formatValue?: (n: any) => string;
|
||||
showLabel?: boolean;
|
||||
showChange?: boolean;
|
||||
showPrevious?: boolean;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export function PagesTable({ allowFilter, ...props }: PagesTableProps) {
|
|||
|
||||
const buttons = [
|
||||
{
|
||||
label: 'URL',
|
||||
label: formatMessage(labels.path),
|
||||
key: 'url',
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue