diff --git a/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveChart.tsx b/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveChart.tsx index 36f7b801b5..94b16e320e 100644 --- a/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveChart.tsx +++ b/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveChart.tsx @@ -134,57 +134,62 @@ export const CreationArchiveChart: FC = ({ const data = notEnoughData || isLoading ? placeholderData : aggregateOrProjectData; + const options = useMemo( + () => ({ + responsive: true, + interaction: { + mode: 'index' as const, + intersect: false, + }, + plugins: { + legend: { + position: 'bottom' as const, + labels: { + color: theme.palette.text.secondary, + usePointStyle: true, + padding: 21, + boxHeight: 8, + }, + }, + tooltip: { + enabled: false, + position: 'average' as const, + external: createTooltip(setTooltip), + }, + }, + locale: locationSettings.locale, + scales: { + x: { + type: 'time' as const, + display: true, + time: { + unit: 'week' as const, + tooltipFormat: 'PPP', + }, + grid: { + display: false, + }, + }, + y: { + type: 'linear' as const, + position: 'left' as const, + beginAtZero: true, + title: { + display: true, + text: 'Number of flags', + }, + }, + }, + }), + [theme, locationSettings, setTooltip], + ); + return ( <>