Peter Stockings
e947feb3e3
refactor(sql_explorer): Replace Plotly with SVG rendering for plots
...
Replaces the Plotly-based graph generation in the SQL Explorer with direct SVG rendering within an HTML template, similar to the exercise progress sparklines.
- Modifies `routes/sql_explorer.py` endpoints (`plot_query`, `plot_unsaved_query`) to fetch raw data instead of using pandas/Plotly.
- Adds `utils.prepare_svg_plot_data` to process raw SQL results, determine plot type (scatter, line, bar, table), normalize data, and prepare it for SVG.
- Creates `templates/partials/sql_explorer/svg_plot.html` to render the SVG plot with axes, ticks, labels, and basic tooltips.
- Removes the `generate_plot` function's usage for SQL Explorer and the direct dependency on Plotly for this feature.
2025-04-15 19:34:26 +10:00
Peter Stockings
39e91f2655
Add support to set degree of line of best fit for exercise progress graphs in custom view
2025-02-06 23:43:10 +11:00
Peter Stockings
fb0e1519e4
Include Plotly js lib
2025-02-01 21:26:52 +11:00
Peter Stockings
c1c4c4a960
Speed up sql plot generation
2025-02-01 21:06:21 +11:00
Peter Stockings
f70438e4e4
Refactor dashboard
2025-01-27 14:46:20 +11:00
Peter Stockings
6b741e50d0
Swtich from person list to new overview page
2025-01-27 01:17:23 +11:00
Peter Stockings
0ed0c20e93
Add person graphs endpoint for workouts per week & PRs per week, consumed via dashboard, person overview and notes
2025-01-27 01:00:50 +11:00
Peter Stockings
049af675cc
Remove unused duplicated stats logic for dashboard
2025-01-27 00:18:02 +11:00
Peter Stockings
527395d704
Make stats refresh, and add filter support to stats endpoint
2025-01-26 23:01:39 +11:00
Peter Stockings
dc543c7b75
Show exercise count in stats
2025-01-26 20:31:39 +11:00
Peter Stockings
cd6f3920f5
Add exercise progress graphs to new person overview page
2025-01-26 20:00:31 +11:00
Peter Stockings
f932ea3c0c
Dashboard is failing in prod but works locally
...
m, b = np.polyfit(relative_positions, estimated_1rm_scaled, 1)
ValueError: On entry to DLASCL parameter number 4 had an illegal value
2025-01-26 18:30:30 +11:00
Peter Stockings
76b610c949
Minor refactor in attempt to speed up site
2025-01-25 00:16:32 +11:00
Peter Stockings
c7013e0eac
Add ability to plot saved queries using plotly, need to check performance in production, also need to improve generate_plot function
2024-11-09 16:49:08 +11:00
Peter Stockings
1384eb007b
Add min/max filter filter for exercise sparkline graph
2024-07-29 21:27:30 +10:00
Peter Stockings
73c1e115bb
Fix bug where left join on person and workouts would return a row even when there wasnt an exercise and therefore crashing on person list view
2024-05-18 18:27:09 +10:00
Peter Stockings
63d997a3f1
Refactor calendar (month and year view), switching to vertical slice arch. Also in progress of refactoring of stats so they are retreived after inital page load for performance sake
2024-04-11 13:45:38 +10:00
Peter Stockings
ff422e9536
Refactor more functions in utils, trying to speed up site
2024-04-07 22:23:26 +10:00
Peter Stockings
916fc47d26
Fix issue where sets werent displayed in order on month overview
2024-04-07 22:09:18 +10:00
Peter Stockings
f21454523f
Fix kg per week/month for exercise progress graphs and remove useless formula
2024-04-04 20:34:27 +11:00
Peter Stockings
6dafdf71dd
Add options to filter epoch for exercise progress graphs (1M, 3M, 6M, All), however if there isnt data in a selected epoch the endpoint returns 404. Havent bothered to look into to it, probs should clean up code as well
2024-04-03 20:31:13 +11:00
Peter Stockings
e3de9f886b
Display liner formula for E1RM over time, and weekly/monthly progress in weight (this part doesnt work well, will probably remove)
2024-03-09 17:15:08 +11:00
Peter Stockings
22f2c68019
Optimise get workout counts function (2-3X faster however it was already pretty fast, need to find more slow shit)
2024-01-14 23:01:49 +11:00
Peter Stockings
dda7cc3b80
Optimise count_prs_over_time function to result in 14.2X improvement in speed which will hopefully remove lag on page requests
2024-01-13 22:33:16 +11:00
Peter Stockings
dc8831160d
Refactor svg render logic (minor)
2024-01-13 21:54:14 +11:00
Peter Stockings
434e6a7250
Fix workouts per week graph, it was erroneously showing sets per week (perhaps add sets/number of exercises per week)
2023-12-11 22:04:05 +11:00
Peter Stockings
197f7bcf6b
Add interactivity to recently created graphs, this time using circles for interactivity
2023-12-11 21:38:52 +11:00
Peter Stockings
2285e870fb
Added graphs to show workouts & PR's per week on dashboard. However there is no tooltip on hover and I duplicated the svg spark line template (May combine the two)
2023-12-11 17:29:10 +11:00
Peter Stockings
fe01b2ade3
Statically render svg graphs on person view as well
2023-12-09 23:30:22 +11:00
Peter Stockings
d0afd92126
Render svg graphs in initial response rather then requesting each graph individually. Initial load file size of dashboard will be larger, unsure if I will rollback this change
2023-12-09 23:10:13 +11:00
Peter Stockings
f9b3854544
On dashboard display list of sets in descending order (start_date) with E1RM
2023-12-09 20:19:24 +11:00
Peter Stockings
d967920e03
Start to refactor away from using camel case (Not sure why I did this in the first place)
2023-12-09 16:14:10 +11:00
Peter Stockings
d51266c2d1
Remove graph model data from dashboard/people endpoints
2023-12-09 15:00:53 +11:00
Peter Stockings
83d3e3136f
Change logic for calendar month view so it always renders the same number of weeks (Sunday-Saturday) regardless of length of month, & what day of the week it started. This resolves the rerender when you switch between months with varying number of weeks
2023-12-07 17:49:19 +11:00
Peter Stockings
6474741f1e
Fix for bug where when on the first of the month(eg today 1/5/23) and your on month view for a person then clicking previous date(Next to eg. May, 2023) would take you to March, also did a slight refactor
2023-05-01 21:20:00 +10:00
Peter Stockings
d44582d2a2
WIP: Plot estimated 1rm on graphs as well, perhaps add another graph with graph options(reps, weight, 1rms etc)
2023-04-02 23:02:51 +10:00
Peter Stockings
c4bd430eaf
WIP: Add graphs to workouts list view that show reps/weight, still need to refactor logic and dont display unless plot button(Need to add) is checked
2023-04-02 22:36:30 +10:00
Peter Stockings
27c27b74a0
Add total sets and average sets per workout to stats
2023-03-21 11:48:55 +11:00
Peter Stockings
0b820eb66e
Add options to configure filter options for dashboard(people, exercise, start/end date)
2023-03-21 00:11:13 +11:00
Peter Stockings
dac5e99f05
Ensure workouts are printed in order of start date descending
2022-12-07 20:56:12 +11:00
Peter Stockings
fe8852c15d
Fix error thrown when viewing profile of a person with a single workout with a single topset
2022-12-04 19:35:53 +11:00
Peter Stockings
afeba8a244
Fix error where a blank topset was rendered for a empty workout
2022-12-03 17:55:51 +11:00
Peter Stockings
0701c1aace
Fix calendar year view
2022-12-03 17:46:07 +11:00
Peter Stockings
b270c86576
Only display column for exercise if the person has completed a topset with said exercise
2022-11-27 14:06:31 +11:00
Peter Stockings
f264596fcf
Add fix for error thrown when fetching /person/id for a person without any workouts
2022-11-27 13:42:59 +11:00
Peter Stockings
cd5f0fcf58
Refactor start_date as date rather then string
2022-11-27 13:22:37 +11:00
Peter Stockings
13135792d8
Update database scheming naming convention
2022-11-20 15:42:58 +11:00
Peter Stockings
e8827afa7f
Fix error thrown when calculating stats with a single workout
2022-11-20 00:32:50 +11:00
Peter Stockings
32389738ff
Show list of workouts in descending order
2022-11-19 20:36:29 +11:00
Peter Stockings
c5029e8183
Rename validation functions
2022-11-19 16:04:04 +11:00