1
0
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:
Thomas Heartman 2024-10-11 09:46:09 +02:00
parent 6601533823
commit cc622e7d81
No known key found for this signature in database
GPG Key ID: BD1F880DAED1EE78
3 changed files with 7 additions and 2 deletions

View File

@ -43,6 +43,7 @@ const placeholderData = (theme: Theme, label?: string) => ({
const ChartWrapper = styled('div')({
width: '80%',
flexGrow: 1,
});
export const PlaceholderFlagMetricsChart: React.FC<{ label?: string }> = ({
@ -185,6 +186,8 @@ const ChartContainer = styled('div')(({ theme }) => ({
flexDirection: 'column',
gap: theme.spacing(3),
alignItems: 'center',
height: '100%',
justifyContent: 'space-between',
}));
const StyledExposure = styled(FlagExposure)({

View File

@ -49,7 +49,7 @@ export const ProjectGrid = styled(ContentGrid)(
export const FlagGrid = styled(ContentGrid)(
onWideContainer({
gridTemplateColumns: '1fr 1fr 1fr',
gridTemplateRows: '480px',
gridTemplateRows: '410px',
display: 'grid',
gridTemplateAreas: `
"flags chart chart"

View File

@ -40,6 +40,7 @@ export const createPlaceholderBarChartOptions = (
},
},
responsive: true,
maintainAspectRatio: false,
scales: {
x: {
stacked: true,
@ -78,7 +79,7 @@ export const createBarChartOptions = (
hoursBack: number,
locationSettings: ILocationSettings,
): ChartOptions<'bar'> => {
const { responsive, elements, interaction, scales } =
const { responsive, elements, interaction, scales, maintainAspectRatio } =
createPlaceholderBarChartOptions(theme);
return {
plugins: {
@ -153,6 +154,7 @@ export const createBarChartOptions = (
},
},
responsive,
maintainAspectRatio,
scales: {
x: {
...(scales ? scales.x : {}),