Skip to content

Commit

Permalink
style: graph placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
jackcasstlesjones committed Dec 19, 2024
1 parent 86eeda9 commit 9278cd0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/app/insights/components/AreaChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ export default function MoodAreaChart({
const width = screen.width * 0.85;

if (!dataArray || dataArray.length === 0) {
return <div>No data available for the graph.</div>;
return (
<>
<div className="w-11/12 m-auto flex justify-center mt-6 bg-twd-graph-background py-24 rounded-lg">
<div>No data available for the graph.</div>
</div>
</>
);
}

// Sort all the mood records by their timestamp
Expand Down
8 changes: 7 additions & 1 deletion src/app/insights/components/LineGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ export default function LineGraph({
const width = screen.width * 0.85;

if (!dataArray || dataArray.length === 0) {
return <div>No data available for the graph.</div>;
return (
<>
<div className="w-11/12 m-auto flex justify-center mt-6 bg-twd-graph-background py-24 rounded-lg">
<div>No data available for the graph.</div>
</div>
</>
);
}

const aggregateDataByMonth = (
Expand Down
8 changes: 7 additions & 1 deletion src/app/insights/components/StreamGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ export default function MoodStreamGraph({
const width = screen.width * 0.85;

if (!dataArray || dataArray.length === 0) {
return <div>No data available for the graph.</div>;
return (
<>
<div className="w-11/12 m-auto flex justify-center mt-6 bg-twd-graph-background py-24 rounded-lg">
<div>No data available for the graph.</div>
</div>
</>
);
}

// Sort data by timestamp
Expand Down

0 comments on commit 9278cd0

Please sign in to comment.