This commit is contained in:
Martino Ferrari
2026-06-19 07:57:42 +02:00
parent ba836f00e6
commit 914108e575
2 changed files with 9 additions and 1 deletions
+2 -1
View File
@@ -70,6 +70,7 @@ export default function PlotWidget({ widget, onContextMenu, timeRange }: Props)
// Stable primitive deps so the effect re-runs when plotType or signals change.
const timeRangeKey = timeRange ? `${timeRange.start}|${timeRange.end}` : 'live';
const plotType = widget.options['plotType'] ?? 'timeseries';
const legendPos = widget.options['legend'] ?? 'bottom';
const signalsKey = widget.signals.map(s => `${s.ds}:${s.name}${s.color ?? ''}`).join(',');
useEffect(() => {
@@ -436,7 +437,7 @@ export default function PlotWidget({ widget, onContextMenu, timeRange }: Props)
return (
<div
class="plot-widget"
class={`plot-widget legend-${legendPos}`}
ref={outerRef}
style={`left:${widget.x}px;top:${widget.y}px;width:${widget.w}px;height:${widget.h}px;`}
onContextMenu={onContextMenu}