The Stats sub-tab is the data-analysis layer of every athlete’s profile in FocusFlow. It consolidates disparate data sources — daily weight logs, circumference measurements from check-ins, logged workout sessions, and compliance records — into a single Evolución y Tendencias Estructurales panel. Rather than hunting across multiple tabs, coaches get a unified, time-series view that makes trends, plateaus, and outliers immediately visible, enabling more precise programme adjustments.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/piratta/gymApp/llms.txt
Use this file to discover all available pages before exploring further.
Available Charts
FocusFlow renders four distinct visualisations using Recharts insideProgressCharts, driven by the AthleteStatsView component. All charts use ResponsiveContainer and display interactive hover tooltips.
Body Weight Evolution — Evolución del Peso
Area Chart
X-axis: dates, sourced from
Y-axis: weight in kilograms (
DailyWeight[].date (sorted chronologically).Y-axis: weight in kilograms (
DailyWeight[].value).Plots the athlete’s fasting morning body weight over time as a filled area chart. The delta from the first recorded entry to the most recent is surfaced in the Variación de peso indicator above the charts — displayed in emerald when the trend is negative (weight loss) and amber when positive.Total Training Volume — Volumen Total Levantado
Bar Chart
X-axis: workout session dates (
Y-axis: total volume in kilograms.Each bar represents one logged workout session. Volume is the sum of completed sets × reps × weight across all exercises in that session, pre-computed and stored in
WorkoutSummary[].date).Y-axis: total volume in kilograms.Each bar represents one logged workout session. Volume is the sum of completed sets × reps × weight across all exercises in that session, pre-computed and stored in
WorkoutSummary.totalVolume. This chart makes it easy to identify deload weeks, injury periods, or spikes in workload.Body Measurements — Medidas Corporales
Line Chart with Site Selector
X-axis: measurement dates, sourced from
Y-axis: circumference in centimetres.A dropdown above the chart lets the coach select which body site to plot. The selector is pre-filtered to only show measurement sites that are enabled in the athlete’s
The Variación de perímetro delta indicator updates dynamically to reflect whichever site is selected, comparing the earliest and latest logged values.
BodyMeasurements[].date (from Reviews).Y-axis: circumference in centimetres.A dropdown above the chart lets the coach select which body site to plot. The selector is pre-filtered to only show measurement sites that are enabled in the athlete’s
ClientProfile.requiredMeasurements. Available sites include:value | Label |
|---|---|
todos | Mix all circumferences |
cintura | Waist |
cinturaUmbilical | Umbilical waist |
cadera | Hip |
pecho | Chest / Thorax |
brazoContraido | Flexed arm |
musloMedio | Mid-thigh |
gemelo | Calf |
| … | (full list in BodyMeasurements) |
Compliance Rate — Porcentaje de Cumplimiento
Radial Ring Indicator
A radial SVG ring that renders the athlete’s overall compliance percentage, sourced from
ClientProfile.routineComplianceRate (passed directly as the complianceRate prop to ProgressCharts). The ring fill animates from 0% to the stored value. A caption below the percentage reads “Rutina completada” and explains that the metric reflects the ratio of successfully logged sets versus those planned by the coach.Data Sources
The table below maps each visualisation to the underlying Firestore collection and TypeScript type.| Chart | Type | Firestore Collection |
|---|---|---|
| Body Weight Evolution | DailyWeight[] | fit_weight_logs |
| Total Training Volume | WorkoutSummary[] | fit_summaries |
| Body Measurements | BodyMeasurements[] (from Reviews) | fit_measurements_logs |
| Compliance Rate | ClientProfile.routineComplianceRate | fit_profiles |
AthleteStatsView receives these as props keyed by clientId:
ProgressCharts, both weight logs and measurement logs are sorted ascending by date so charts always plot left-to-right chronologically.
Chart Library
All charts are rendered with Recharts, a composable React charting library built on SVG. Key properties used throughout FocusFlow’s stats panel:ResponsiveContainer
Every chart fills its parent container width at 100%, making the layout fully responsive across desktop and tablet breakpoints.
Hover Tooltips
<Tooltip> with a dark theme (backgroundColor: "rgba(15, 23, 42, 0.85)") is enabled on all charts. Hovering any data point reveals the exact value and date.Interactive Legends
<Legend> components allow toggling individual data series on and off for multi-line charts (e.g. the measurements chart in todos mode).Dual Y-Axes
Some charts (like the plicometría composition chart) use dual Y-axes (
yAxisId="left" / "right") to overlay series with different scales.Completed Sessions Log
Below the chart panel, the Stats sub-tab renders a scrollable log of all completed workout sessions for the selected athlete. Each session card shows:Session header
Date (
WorkoutSummary.date) and Day name (dayName, e.g. “Lunes - Torso”), with time spent displayed as Math.round(timeSpentSeconds / 60) minutes.Exercise breakdown
Every logged exercise from
loggedExercises with its name, category, and set-by-set breakdown: target reps, achieved reps, weight used, and completion flag.