mirror of
https://github.com/Unleash/unleash.git
synced 2025-10-04 11:17:02 +02:00
fix: fix chart height
This commit is contained in:
parent
6601533823
commit
cc622e7d81
@ -43,6 +43,7 @@ const placeholderData = (theme: Theme, label?: string) => ({
|
|||||||
|
|
||||||
const ChartWrapper = styled('div')({
|
const ChartWrapper = styled('div')({
|
||||||
width: '80%',
|
width: '80%',
|
||||||
|
flexGrow: 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const PlaceholderFlagMetricsChart: React.FC<{ label?: string }> = ({
|
export const PlaceholderFlagMetricsChart: React.FC<{ label?: string }> = ({
|
||||||
@ -185,6 +186,8 @@ const ChartContainer = styled('div')(({ theme }) => ({
|
|||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
gap: theme.spacing(3),
|
gap: theme.spacing(3),
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
height: '100%',
|
||||||
|
justifyContent: 'space-between',
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const StyledExposure = styled(FlagExposure)({
|
const StyledExposure = styled(FlagExposure)({
|
||||||
|
@ -49,7 +49,7 @@ export const ProjectGrid = styled(ContentGrid)(
|
|||||||
export const FlagGrid = styled(ContentGrid)(
|
export const FlagGrid = styled(ContentGrid)(
|
||||||
onWideContainer({
|
onWideContainer({
|
||||||
gridTemplateColumns: '1fr 1fr 1fr',
|
gridTemplateColumns: '1fr 1fr 1fr',
|
||||||
gridTemplateRows: '480px',
|
gridTemplateRows: '410px',
|
||||||
display: 'grid',
|
display: 'grid',
|
||||||
gridTemplateAreas: `
|
gridTemplateAreas: `
|
||||||
"flags chart chart"
|
"flags chart chart"
|
||||||
|
@ -40,6 +40,7 @@ export const createPlaceholderBarChartOptions = (
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
responsive: true,
|
responsive: true,
|
||||||
|
maintainAspectRatio: false,
|
||||||
scales: {
|
scales: {
|
||||||
x: {
|
x: {
|
||||||
stacked: true,
|
stacked: true,
|
||||||
@ -78,7 +79,7 @@ export const createBarChartOptions = (
|
|||||||
hoursBack: number,
|
hoursBack: number,
|
||||||
locationSettings: ILocationSettings,
|
locationSettings: ILocationSettings,
|
||||||
): ChartOptions<'bar'> => {
|
): ChartOptions<'bar'> => {
|
||||||
const { responsive, elements, interaction, scales } =
|
const { responsive, elements, interaction, scales, maintainAspectRatio } =
|
||||||
createPlaceholderBarChartOptions(theme);
|
createPlaceholderBarChartOptions(theme);
|
||||||
return {
|
return {
|
||||||
plugins: {
|
plugins: {
|
||||||
@ -153,6 +154,7 @@ export const createBarChartOptions = (
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
responsive,
|
responsive,
|
||||||
|
maintainAspectRatio,
|
||||||
scales: {
|
scales: {
|
||||||
x: {
|
x: {
|
||||||
...(scales ? scales.x : {}),
|
...(scales ? scales.x : {}),
|
||||||
|
Loading…
Reference in New Issue
Block a user