The sidebar with its controls could be extracted into a CompareSidebar component.
The main chart area could be a component that internally manages the activeChartView and renders the appropriate chart.
Data transformation logic, like that in useMemo hooks, could be moved into custom hooks (e.g., useCompareChartData, useDeferralPoints) to separate concerns.