diff --git a/frontend/src/components/BarGraph.tsx b/frontend/src/components/BarGraph.tsx index 8a3c166..a167cf0 100644 --- a/frontend/src/components/BarGraph.tsx +++ b/frontend/src/components/BarGraph.tsx @@ -24,6 +24,10 @@ export function BarGraph({ title, chartData, chartConfig, info }: { const filteredData = chartData.filter(data => data.ingestPrice !== null || data.outputPrice !== null); + const isMobile = window.innerWidth <= 768; // Adjust the breakpoint as needed + + const displayedData = isMobile ? filteredData.slice(0, 4) : filteredData; + return (
@@ -34,7 +38,7 @@ export function BarGraph({ title, chartData, chartConfig, info }: { - +
) -} +} \ No newline at end of file