+
%sveltekit.head%
diff --git a/src/lib/assets/favicon.svg b/src/lib/assets/favicon.svg
index cc5dc66..e88d727 100644
--- a/src/lib/assets/favicon.svg
+++ b/src/lib/assets/favicon.svg
@@ -1 +1,46 @@
-
\ No newline at end of file
+
diff --git a/src/lib/charts/CanvasChart.svelte b/src/lib/charts/CanvasChart.svelte
index 535a5c2..84d306f 100644
--- a/src/lib/charts/CanvasChart.svelte
+++ b/src/lib/charts/CanvasChart.svelte
@@ -4,7 +4,7 @@
Renders line and bar series over a shared hourly time axis on a
devicePixelRatio-aware canvas. Supports daylight background bands,
timezone-aware axis labels with emphasized day boundaries, a DOM tooltip
- with crosshair, wheel/pinch zoom, drag panning, and cross-chart
+ with crosshair, Ctrl+wheel / pinch zoom, drag panning, and cross-chart
synchronization via the `group` prop.
Usage:
@@ -161,6 +161,16 @@
let themeVersion = $state(0);
const legendHidden = new SvelteSet();
+ // Briefly shown when the user scrolls over the chart without holding Ctrl
+ let zoomHintVisible = $state(false);
+ let zoomHintTimeout: ReturnType | undefined;
+
+ function showZoomHint(): void {
+ zoomHintVisible = true;
+ clearTimeout(zoomHintTimeout);
+ zoomHintTimeout = setTimeout(() => (zoomHintVisible = false), 1200);
+ }
+
// Zoom range and crosshair: either group-shared or local to this chart.
// The group is acquired once at component init (the prop is treated as fixed).
const groupName = untrack(() => group);
@@ -170,6 +180,7 @@
onDestroy(() => {
if (groupName) releaseGroup(groupName);
+ clearTimeout(zoomHintTimeout);
});
// ─── Derived: view window & scales ──────────────────────────────────────────
@@ -737,6 +748,12 @@
};
const onWheel = (e: WheelEvent): void => {
+ // Zoom only while Ctrl (or ⌘) is held — a plain scroll should keep
+ // scrolling the page. Trackpad pinch also arrives as ctrlKey wheel.
+ if (!e.ctrlKey && !e.metaKey) {
+ showZoomHint();
+ return;
+ }
e.preventDefault();
const t = pixToTime(localX(e));
zoomAt(t, e.deltaY < 0 ? 1 / 1.3 : 1.3);
@@ -803,6 +820,19 @@
style:touch-action="pan-y"
>
+ {#if zoomHintVisible}
+