Skip to content

Commit f7482a1

Browse files
committed
feat: add brush slider to Protocol Growth chart for time range zoom
1 parent 354e82f commit f7482a1

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

components/network/ProtocolStatsChart.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { useEffect, useState, useMemo } from 'react';
44
import {
5-
AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, Legend,
5+
AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, Legend, Brush,
66
} from 'recharts';
77
import { getApiUrl } from '@/lib/api-config';
88
import { useTheme } from '@/contexts/ThemeContext';
@@ -227,6 +227,14 @@ export function ProtocolStatsChart() {
227227
/>
228228
</>
229229
)}
230+
<Brush
231+
dataKey="label"
232+
height={20}
233+
stroke="var(--color-border-subtle)"
234+
fill="var(--color-bg-card)"
235+
travellerWidth={8}
236+
tickFormatter={() => ''}
237+
/>
230238
</AreaChart>
231239
</ResponsiveContainer>
232240
</ChartCard>

0 commit comments

Comments
 (0)