Skip to content

Commit

Permalink
๐Ÿ› fix: versus ๋ ˆ๋ฒจ ์ฆ๊ฐ€ ๊ทธ๋ž˜ํ”„ ์ƒ‰ ๋ณ€๊ฒฝ
Browse files Browse the repository at this point in the history
  • Loading branch information
yoopark committed Jul 25, 2023
1 parent 47125fa commit d11b75d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ type LevelRecordsChartProps = {
series: ApexAxisChartSeries;
};

export const LevelRecordsChart = ({ series }: LevelRecordsChartProps) => {
const LevelRecordsChart = ({ series }: LevelRecordsChartProps) => {
const theme = useTheme();

const options: ApexCharts.ApexOptions = {
Expand Down
32 changes: 31 additions & 1 deletion app/src/Profile/dashboard-contents/Versus/LevelRecords.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { LevelRecordsChart } from '@/Profile/dashboard-contents/General';
import { useQuery } from '@apollo/client';
import { useTheme } from '@emotion/react';
import { gql } from '@shared/__generated__';
import { userAtom } from '@shared/atoms/userAtom';
import { LineChart } from '@shared/components/Chart';
import { DashboardContent } from '@shared/components/DashboardContent';
import {
DashboardContentBadRequest,
Expand Down Expand Up @@ -85,3 +86,32 @@ export const LevelRecords = () => {
</DashboardContent>
);
};

type LevelRecordsChartProps = {
series: ApexAxisChartSeries;
};

const LevelRecordsChart = ({ series }: LevelRecordsChartProps) => {
const theme = useTheme();

const options: ApexCharts.ApexOptions = {
colors: [theme.colors.primary.default, theme.colors.accent.default],
xaxis: {
labels: {
formatter: (value) => `${value}`,
},
},
yaxis: {
labels: {
formatter: (value) => `lv. ${value}`,
},
},
tooltip: {
x: {
formatter: (value) => `${value}๊ฐœ์›” ์ฐจ`,
},
},
};

return <LineChart series={series} options={options} />;
};

0 comments on commit d11b75d

Please sign in to comment.