From b7019b33ac6acf1ded1e21e7e60c110a26c5d1a8 Mon Sep 17 00:00:00 2001 From: Developer Date: Sun, 12 Jul 2026 11:46:07 +0000 Subject: [PATCH] feat(widgets): scale chart axes/tooltips with unit + scale options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Consistent graph scaling across every line-chart widget. A new shared frontend/src/lib/metricFormat.ts picks a decimal prefix (kB/MB/GB, kbps/Mbps, Gbps, …) from the series magnitude and formats values; LineSeriesChart accepts unit + scale and formats both the Y-axis ticks and the tooltip with the SAME prefix (one consistent unit per axis). MetricChartWidget (Prometheus) and QbittorrentSpeedWidget pass the widget config through; qBit speed defaults to bytes/sec → MB/s. WidgetConfigDialog now renders `enum` schema fields as a onChange({ ...config, [key]: v })} + > + + + + + {enumOptions.map((opt) => ( + + {opt.replace(/_/g, " ")} + + ))} + + + ) : isTextarea ? (