From 8e751e77b71acc954442a8d2299478cceafa8973 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Wed, 17 Jun 2026 09:41:42 +0200 Subject: [PATCH] fix(chart): render title and profile legend by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vue casts an absent boolean prop to false, so withChrome was always false and the v-if="withChrome !== false" guards hid the title and legend everywhere — including the PNG export. Default withChrome to true via withDefaults so the legend renders. --- src/components/RadarChart.vue | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/RadarChart.vue b/src/components/RadarChart.vue index 3ac6f0e..83c0b97 100644 --- a/src/components/RadarChart.vue +++ b/src/components/RadarChart.vue @@ -3,11 +3,14 @@ import { computed } from 'vue' import type { Radar } from '../types' import { MAX_SCORE } from '../types' -const props = defineProps<{ - radar: Radar - /** If true, the SVG renders Radar name (top) and legend (bottom). */ - withChrome?: boolean -}>() +const props = withDefaults( + defineProps<{ + radar: Radar + /** Renders the radar name (top) and profile legend (bottom). Defaults to true. */ + withChrome?: boolean + }>(), + { withChrome: true }, +) const WIDTH = 720 const HEIGHT = computed(() => (props.withChrome === false ? 600 : 800))