Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Add distribution histogram chart type

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