Export Single Graph to PDF 📂 - Will & Justin #48#53
Open
Conversation
8 tasks
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
tika
requested changes
Feb 4, 2026
Collaborator
tika
left a comment
There was a problem hiding this comment.
just a few things that you need to uncomment
| "dotenv": "^17.2.3", | ||
| "drizzle-orm": "^0.44.7", | ||
| "framer-motion": "^12.23.24", | ||
| "html2canvas": "^1.4.1", |
Collaborator
There was a problem hiding this comment.
why install a dep if you're not going to use it
Collaborator
There was a problem hiding this comment.
nit: call this file export-to-pdf.ts. it's cleaner
|
|
||
| import { useEffect, useState } from "react"; | ||
| import { toast } from "sonner"; | ||
| //import { toast } from "sonner"; |
| //const isAuthPage = pathname === "/signin"; | ||
|
|
||
| // If on auth pages, just render children without sidebar | ||
| if (isAuthPage) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sprint
Export Single Graph to PDF 📂 - Will & Justin #48
Who worked on this sprint?
Will and Justin
Features Implemented
Exporting a bar/line graph to a pdf
New files created
/src/lib/exporttopdf.ts
Existing files modified
/src/app/graphs/page.tsx
/src/components/BarGraph.tsx
/src/components/LineGraph.tsx
Acceptance Criteria
The export button downloads the graph in current view to a PDF
PDF does not cut-off any part of the graph (i.e. looks identical to browser)
Filters are captured in the exported PDF
Exporting works across all major browsers
Export button is responsive while loading and resets once finished
UI matches Figma
Code runs locally without errors and builds successfully
Merge via PR
Testing: how did you test?
Tried exporting a variety of bar/line graphs on different browsers
Features Not Implemented/Incomplete
Loading feature is not developed
Screenshots:
https://github.com/user-attachments/assets/3e07764d-a093-41ea-8fda-49cf29ce59cc
Tag Dan and Shayne
@danglorioso @shaynesidman