From 0223437f499cf638b83e77bb4d4e6417017e30a2 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Mon, 25 Aug 2025 14:27:07 +0200 Subject: [PATCH] Remove ratio graph & column to the right (#10529) This PR removes the flags archived / flags created trend line as well as the right-hand column. Before: image After: image I'm not deleting the tooltip yet, because I think we'll want to re-use that for the group tooltip. --- .../CreationArchiveChart.tsx | 39 +------------------ 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveChart.tsx b/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveChart.tsx index 6b18985f56..c58285724f 100644 --- a/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveChart.tsx +++ b/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveChart.tsx @@ -25,7 +25,6 @@ import { } from 'component/insights/components/LineChart/ChartTooltip/ChartTooltip'; import { createTooltip } from 'component/insights/components/LineChart/createTooltip'; import { CreationArchiveTooltip } from './CreationArchiveTooltip.tsx'; -import { CreationArchiveRatioTooltip } from './CreationArchiveRatioTooltip.tsx'; import { getFlagTypeColors } from './flagTypeColors.ts'; import type { WeekData, RawWeekData } from './types.ts'; @@ -153,19 +152,6 @@ export const CreationArchiveChart: FC = ({ order: 2, }, ...flagTypeDatasets, - { - label: 'Flags archived / Flags created', - data: weeks, - borderColor: theme.palette.primary.light, - backgroundColor: theme.palette.primary.light, - type: 'line' as const, - parsing: { - yAxisKey: 'archivePercentage', - xAxisKey: 'date', - }, - yAxisID: 'y1', - order: 1, - }, ], flagTypeNames, }; @@ -256,38 +242,15 @@ export const CreationArchiveChart: FC = ({ text: 'Number of flags', }, }, - y1: { - type: 'linear', - display: true, - position: 'right', - beginAtZero: true, - title: { - display: true, - text: 'Ratio', - }, - grid: { - drawOnChartArea: false, - }, - ticks: { - callback: (value) => `${value}%`, - }, - }, }, }} height={100} width={250} /> {tooltip?.dataPoints?.some( - (point) => - point.dataset.label !== 'Archived flags' && - point.dataset.label !== 'Flags archived / Flags created', + (point) => point.dataset.label !== 'Archived flags', ) ? ( - ) : tooltip?.dataPoints?.some( - (point) => - point.dataset.label === 'Flags archived / Flags created', - ) ? ( - ) : ( )}