Skip to content

Commit

Permalink
style: update LineGraph.tsx plotly chat width to be dynamic with user…
Browse files Browse the repository at this point in the history
…'s screen width
  • Loading branch information
maxitect committed Dec 16, 2024
1 parent 17229a2 commit 3a4d306
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/insights/components/LineGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export default function LineGraph({
endOfRange,
selectedButton,
}: LineGraphProps) {
const width = screen.width * 0.85;

if (!dataArray || dataArray.length === 0) {
return <div>No data available for the graph.</div>;
}
Expand Down Expand Up @@ -181,8 +183,8 @@ export default function LineGraph({
},
]}
layout={{
width: 350,
height: 350,
width: width,
height: width,
margin: {
l: 10,
r: 10,
Expand Down

0 comments on commit 3a4d306

Please sign in to comment.