mirror of
https://github.com/ershisan99/www.git
synced 2025-12-17 12:34:17 +00:00
add yaxis to mmr chart
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
|||||||
ChartTooltipContent,
|
ChartTooltipContent,
|
||||||
} from '@/components/ui/chart'
|
} from '@/components/ui/chart'
|
||||||
import type { SelectGames } from '@/server/db/types'
|
import type { SelectGames } from '@/server/db/types'
|
||||||
import { CartesianGrid, Line, LineChart, XAxis } from 'recharts'
|
import { CartesianGrid, Line, LineChart, XAxis, YAxis } from 'recharts'
|
||||||
|
|
||||||
const chartConfig = {
|
const chartConfig = {
|
||||||
mmr: {
|
mmr: {
|
||||||
@@ -37,7 +37,7 @@ export function MmrTrendChart({ games }: { games: SelectGames[] }) {
|
|||||||
<CardTitle>MMR Trends</CardTitle>
|
<CardTitle>MMR Trends</CardTitle>
|
||||||
<CardDescription>All time</CardDescription>
|
<CardDescription>All time</CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent>
|
<CardContent className={'p-2'}>
|
||||||
<ChartContainer config={chartConfig}>
|
<ChartContainer config={chartConfig}>
|
||||||
<LineChart
|
<LineChart
|
||||||
accessibilityLayer
|
accessibilityLayer
|
||||||
@@ -60,6 +60,12 @@ export function MmrTrendChart({ games }: { games: SelectGames[] }) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
<YAxis
|
||||||
|
dataKey={'mmr'}
|
||||||
|
width={40}
|
||||||
|
tickLine={false}
|
||||||
|
axisLine={false}
|
||||||
|
/>
|
||||||
<ChartTooltip
|
<ChartTooltip
|
||||||
cursor={false}
|
cursor={false}
|
||||||
content={<ChartTooltipContent hideLabel />}
|
content={<ChartTooltipContent hideLabel />}
|
||||||
|
|||||||
Reference in New Issue
Block a user