Plot fix
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user