mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 23:57:12 +01:00
Website compare fix. Updated date functions.
This commit is contained in:
parent
5a85433e63
commit
da173779e0
7 changed files with 91 additions and 94 deletions
|
|
@ -5,7 +5,7 @@ import { Chart, ChartProps } from '@/components/charts/Chart';
|
|||
import { useLocale } from '@/components/hooks';
|
||||
import { renderNumberLabels } from '@/lib/charts';
|
||||
import { getThemeColors } from '@/lib/colors';
|
||||
import { formatDate, formatDateByUnit } from '@/lib/date';
|
||||
import { formatDate, DATE_FORMATS } from '@/lib/date';
|
||||
import { formatLongCurrency, formatLongNumber } from '@/lib/format';
|
||||
|
||||
const dateFormats = {
|
||||
|
|
@ -37,7 +37,7 @@ export function BarChart({
|
|||
renderXLabel,
|
||||
renderYLabel,
|
||||
unit,
|
||||
XAxisType = 'time',
|
||||
XAxisType = 'timeseries',
|
||||
YAxisType = 'linear',
|
||||
stacked = false,
|
||||
minDate,
|
||||
|
|
@ -57,8 +57,8 @@ export function BarChart({
|
|||
x: {
|
||||
type: XAxisType,
|
||||
stacked: true,
|
||||
min: formatDateByUnit(minDate, unit),
|
||||
max: formatDateByUnit(maxDate, unit),
|
||||
min: formatDate(minDate, DATE_FORMATS[unit], locale),
|
||||
max: formatDate(maxDate, DATE_FORMATS[unit], locale),
|
||||
offset: true,
|
||||
time: {
|
||||
unit,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue