fix(fitness): read .value off rendered pending point in body-parts chart legend

The raw series has `pending: number | null`, but the rendered series stores
pending as `{ x, y, value }` for SVG placement. Legend labels were calling
`.toFixed(1)` directly on the object, crashing as soon as a pending value
existed (i.e. whenever the user typed a measurement).
This commit is contained in:
2026-04-20 16:51:29 +02:00
parent 3aa8f38f92
commit 97e8734709
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "homepage",
"version": "1.36.2",
"version": "1.36.3",
"private": true,
"type": "module",
"scripts": {
@@ -512,7 +512,7 @@
<span class="swatch" style:background={s.color}></span>
<span>{s.name}</span>
{#if s.pending != null}
<span class="legend-val">{s.pending.toFixed(1)}</span>
<span class="legend-val">{s.pending.value.toFixed(1)}</span>
{/if}
</span>
{/each}
@@ -521,7 +521,7 @@
<div class="legend single">
<span class="legend-item">
<span class="swatch" style:background={chart.series[0].color}></span>
<span class="legend-val">{chart.series[0].pending.toFixed(1)} cm</span>
<span class="legend-val">{chart.series[0].pending.value.toFixed(1)} cm</span>
<span class="legend-tag">{t('today_short', lang)}</span>
</span>
</div>