mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-24 17:51:14 +02:00
Update time formats for other charts on analytics page
This commit is contained in:
parent
57503a30cf
commit
fba431bfe7
@ -4,6 +4,7 @@ import type { TooltipState } from './ChartTooltip/ChartTooltip.jsx';
|
||||
import { createTooltip } from './createTooltip.js';
|
||||
import { legendOptions } from './legendOptions.js';
|
||||
import type { ChartOptions } from 'chart.js';
|
||||
import { getDateFnsLocale } from 'component/insights/getDateFnsLocale.js';
|
||||
|
||||
export const createOptions = (
|
||||
theme: Theme,
|
||||
@ -59,10 +60,15 @@ export const createOptions = (
|
||||
},
|
||||
},
|
||||
x: {
|
||||
adapters: {
|
||||
date: {
|
||||
locale: getDateFnsLocale(locationSettings.locale),
|
||||
},
|
||||
},
|
||||
type: 'time',
|
||||
time: {
|
||||
unit: 'week',
|
||||
tooltipFormat: 'PPP',
|
||||
tooltipFormat: 'P',
|
||||
},
|
||||
grid: {
|
||||
color: 'transparent',
|
||||
|
@ -23,7 +23,7 @@ import type { WeekData, RawWeekData } from './types.ts';
|
||||
import { createTooltip } from 'component/insights/components/LineChart/createTooltip.ts';
|
||||
import { CreationArchiveRatioTooltip } from './CreationArchiveRatioTooltip.tsx';
|
||||
import { Chart } from 'react-chartjs-2';
|
||||
import { getDateFnsLocale } from './getDateFnsLocale.ts';
|
||||
import { getDateFnsLocale } from '../../getDateFnsLocale.ts';
|
||||
|
||||
ChartJS.register(
|
||||
CategoryScale,
|
||||
|
Loading…
Reference in New Issue
Block a user