mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01: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')({
 | 
			
		||||
    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)({
 | 
			
		||||
 | 
			
		||||
@ -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"
 | 
			
		||||
 | 
			
		||||
@ -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 : {}),
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user