mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 21:27:20 +01:00
Merge remote-tracking branch 'upstream/master' into fix-font-family
This commit is contained in:
commit
01fc293d3f
19 changed files with 305 additions and 321 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: minDate,
|
||||
min: minDate && new Date(minDate).getSeconds() === 0 ? minDate : '',
|
||||
max: maxDate,
|
||||
time: {
|
||||
unit,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ export interface DataTableProps {
|
|||
searchDelay?: number;
|
||||
allowSearch?: boolean;
|
||||
allowPaging?: boolean;
|
||||
autoFocus?: boolean;
|
||||
renderEmpty?: () => ReactNode;
|
||||
children: ReactNode | ((data: any) => ReactNode);
|
||||
}
|
||||
|
|
@ -24,6 +25,7 @@ export function DataTable({
|
|||
searchDelay = 600,
|
||||
allowSearch = true,
|
||||
allowPaging = true,
|
||||
autoFocus = true,
|
||||
renderEmpty,
|
||||
children,
|
||||
}: DataTableProps) {
|
||||
|
|
@ -57,7 +59,7 @@ export function DataTable({
|
|||
value={query}
|
||||
onSearch={handleSearch}
|
||||
delay={searchDelay || DEFAULT_SEARCH_DELAY}
|
||||
autoFocus={true}
|
||||
autoFocus={autoFocus}
|
||||
placeholder={formatMessage(labels.search)}
|
||||
/>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -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