LFFE-10 responsive debug
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
import Chart from "@/core/components/Chart";
|
import Chart from "@/core/components/Chart";
|
||||||
import {useTheme} from "@mui/material/styles";
|
import {useTheme} from "@mui/material/styles";
|
||||||
|
import {useMediaQuery} from "@mui/material";
|
||||||
|
|
||||||
|
|
||||||
const Pie = ({data}) => {
|
const Pie = ({data}) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const windowsWidth = window.innerWidth;
|
const upperSm = useMediaQuery((theme.breakpoints.up("sm")))
|
||||||
const specialOption = {
|
const specialOption = {
|
||||||
title: {
|
title: {
|
||||||
text: undefined,
|
text: undefined,
|
||||||
@@ -21,7 +22,7 @@ const Pie = ({data}) => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
show: windowsWidth > theme.breakpoints.values.sm
|
show: upperSm
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const series = data.map((item) => +item.percentage)
|
const series = data.map((item) => +item.percentage)
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import Chart from "@/core/components/Chart";
|
import Chart from "@/core/components/Chart";
|
||||||
import {useTheme} from "@mui/material/styles";
|
import {useTheme} from "@mui/material/styles";
|
||||||
|
import {useMediaQuery} from "@mui/material";
|
||||||
|
|
||||||
const PolarChart = ({data}) => {
|
const PolarChart = ({data}) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const windowsWidth = window.innerWidth;
|
const upperSm = useMediaQuery((theme.breakpoints.up("sm")))
|
||||||
const specialOption = {
|
const specialOption = {
|
||||||
title: {
|
title: {
|
||||||
text: undefined,
|
text: undefined,
|
||||||
@@ -28,7 +29,7 @@ const PolarChart = ({data}) => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
show: windowsWidth > theme.breakpoints.values.sm
|
show: upperSm
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const series = data.map((item) => +item.percentage)
|
const series = data.map((item) => +item.percentage)
|
||||||
|
|||||||
Reference in New Issue
Block a user