Skip to content

Commit bf664ff

Browse files
authored
Merge pull request #5735 from bcgov/fix/5714
fix(5714): make cost charts responsive
2 parents 67cc19a + 12b0033 commit bf664ff

File tree

6 files changed

+6
-3
lines changed

6 files changed

+6
-3
lines changed

app/components/private-cloud/monthly-cost/MonthyCostChart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function MonthlyCostChart({ data }: { data: Pick<MonthlyCost, 'da
2020
return (
2121
<Card>
2222
<Title>Daily Cost Breakdown for the selected month</Title>
23-
<div className="relative">
23+
<div className="relative min-h-[45rem]">
2424
<Bar options={options} data={chartData} />
2525
</div>
2626
</Card>

app/components/private-cloud/monthly-cost/monthly-cost-chart-data.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export function getMonthlyCostChartConfig({ data }: { data: Pick<MonthlyCost, 'd
2525
},
2626
},
2727
responsive: true,
28+
maintainAspectRatio: false,
2829
scales: {
2930
x: {
3031
stacked: true,

app/components/private-cloud/quarterly-cost/QuarterlyCostChart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function QuarterlyCostChart({ data }: { data: Pick<QuarterlyCost,
2020
return (
2121
<Card>
2222
<Title>Quarterly Cost Breakdown for the selected quarter</Title>
23-
<div className="relative">
23+
<div className="relative min-h-[45rem]">
2424
<Bar options={options} data={chartData} />
2525
</div>
2626
</Card>

app/components/private-cloud/quarterly-cost/quarterly-cost-chart-data.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export function getQuarterlyCostChartConfig({ data }: { data: Pick<QuarterlyCost
2525
},
2626
},
2727
responsive: true,
28+
maintainAspectRatio: false,
2829
scales: {
2930
x: {
3031
stacked: true,

app/components/private-cloud/yearly-cost/YearlyCostChart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function YearlyCostChart({ data }: { data: Pick<YearlyCost, 'mont
2020
return (
2121
<Card>
2222
<Title>Monthly Cost Breakdown for the selected year</Title>
23-
<div className="relative">
23+
<div className="relative min-h-[45rem]">
2424
<Bar options={options} data={chartData} />
2525
</div>
2626
</Card>

app/components/private-cloud/yearly-cost/yearly-cost-chart-data.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export function getYearlyCostChartConfig({ data }: { data: Pick<YearlyCost, 'mon
2525
},
2626
},
2727
responsive: true,
28+
maintainAspectRatio: false,
2829
scales: {
2930
x: {
3031
stacked: true,

0 commit comments

Comments
 (0)