LFFE-10 complete responsive part of charts

This commit is contained in:
2023-11-18 10:50:56 +03:30
parent e928e0aa41
commit 656b01f82a
2 changed files with 15 additions and 0 deletions

View File

@@ -1,6 +1,11 @@
import Chart from "@/core/components/Chart";
import {useTheme} from "@mui/material/styles";
const Pie = ({data}) => {
const theme = useTheme();
const windowsWidth = window.innerWidth;
console.log(windowsWidth <= theme.breakpoints.values.sm)
const specialOption = {
title: {
text: undefined,
@@ -16,6 +21,9 @@ const Pie = ({data}) => {
fontWeight: 300,
},
},
legend: {
show: windowsWidth > theme.breakpoints.values.sm
}
};
const series = data.map((item) => +item.percentage)
return (

View File

@@ -1,6 +1,10 @@
import Chart from "@/core/components/Chart";
import {useTheme} from "@mui/material/styles";
const PolarChart = ({data}) => {
const theme = useTheme();
const windowsWidth = window.innerWidth;
console.log(windowsWidth <= theme.breakpoints.values.sm)
const specialOption = {
title: {
text: undefined,
@@ -24,6 +28,9 @@ const PolarChart = ({data}) => {
fontWeight: 400,
},
},
legend: {
show: windowsWidth > theme.breakpoints.values.sm
}
};
const series = data.map((item) => +item.percentage)
return (