Skip to content

Commit

Permalink
chore: better responsive for charts
Browse files Browse the repository at this point in the history
  • Loading branch information
duyet committed Nov 27, 2023
1 parent e4f5562 commit 43dc5bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/overview/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default async function Overview() {
</div>
</div>
<TabsContent value="overview" className="space-y-4">
<div className="grid grid-cols-2 items-stretch gap-5">
<div className="grid grid-cols-1 items-stretch gap-5 md:grid-cols-2">
<ChartAvgMemory
title="Memory Usage last 24h (avg / 10 minutes)"
className="w-full"
Expand Down
5 changes: 3 additions & 2 deletions components/related-charts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ export async function RelatedCharts({
charts.push([chartsModule.default, props])
}

const chartWidth = charts.length > 1 ? `w-1/${charts.length}` : 'w-full'
const chartWidth =
charts.length > 1 ? `w-full md:w-1/${charts.length}` : 'w-full'

return (
<div className={cn('mb-5 flex flex-row gap-5', className)}>
<div className={cn('mb-5 flex flex-col gap-5 md:flex-row', className)}>
{charts.map(([Chart, props], i) => (
<Chart
key={i}
Expand Down

0 comments on commit 43dc5bc

Please sign in to comment.