Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Add a weekly change (delta) chart type

Roland Geiderf810c8e702e7
diff --git a/wger/measurements/migrations/0006_health_sync.py b/wger/measurements/migrations/0006_health_sync.py
index f38060310..2fd0f0c39 100644
--- a/wger/measurements/migrations/0006_health_sync.py
+++ b/wger/measurements/migrations/0006_health_sync.py
@@ -66,7 +66,7 @@ class Migration(migrations.Migration):
name='chart_type',
field=models.CharField(
blank=True,
- choices=[('line', 'Line'), ('bar', 'Bar'), ('heatmap', 'Heatmap')],
+ choices=[('line', 'Line'), ('bar', 'Bar'), ('heatmap', 'Heatmap'), ('delta', 'Delta')],
max_length=20,
null=True,
verbose_name='Chart type',
diff --git a/wger/measurements/models/category.py b/wger/measurements/models/category.py
index 4f0f3fa56..ba1ab6d70 100644
--- a/wger/measurements/models/category.py
+++ b/wger/measurements/models/category.py
@@ -94,6 +94,7 @@ class ChartType(models.TextChoices):
LINE = 'line'
BAR = 'bar'
HEATMAP = 'heatmap'
+ DELTA = 'delta'
GROUP_COMPONENTS: dict[str, list[tuple[str, str]]] = {