diff --git a/src/lib/components/charts/ChartContainer.svelte b/src/lib/components/charts/ChartContainer.svelte index 7710f99..ee6b24e 100644 --- a/src/lib/components/charts/ChartContainer.svelte +++ b/src/lib/components/charts/ChartContainer.svelte @@ -31,6 +31,8 @@ chartHeight?: number; /** Extra vertical padding in pixels added to the total min-height (default: 2) */ extraPadding?: number; + /** Minimum chart width in pixels; narrower viewports scroll sideways (default: 560) */ + minWidth?: number; /** Optional CSS class for the outer wrapper */ class?: string; /** Slot content (charts go here) */ @@ -42,6 +44,7 @@ chartCount = 1, chartHeight = 300, extraPadding = 2, + minWidth = 560, class: className = '', children }: Props = $props(); @@ -51,53 +54,63 @@ let minHeight = $derived(chartHeight * chartCount + extraPadding); -