From a4dea3d6a95651f7772667c7dd8ac77f6f3bb0c7 Mon Sep 17 00:00:00 2001 From: Sonja Happ Date: Wed, 20 May 2020 13:46:33 +0200 Subject: [PATCH] PlotTable widget: shift signal indices by 1 #218 --- src/widget/widgets/plot-table.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/widget/widgets/plot-table.js b/src/widget/widgets/plot-table.js index 3d851d6..155131e 100644 --- a/src/widget/widgets/plot-table.js +++ b/src/widget/widgets/plot-table.js @@ -45,14 +45,14 @@ class WidgetPlotTable extends Component { // distinguish between input and output signals if (sig.direction === "out") { if (props.data[icID] != null && props.data[icID].output != null && props.data[icID].output.values != null) { - if (props.data[icID].output.values[sig.index] !== undefined) { - data.push(props.data[icID].output.values[sig.index]); + if (props.data[icID].output.values[sig.index-1] !== undefined) { + data.push(props.data[icID].output.values[sig.index-1]); } } } else if (sig.direction === "in") { if (props.data[icID] != null && props.data[icID].input != null && props.data[icID].input.values != null) { - if (props.data[icID].input.values[sig.index] !== undefined) { - data.push(props.data[icID].input.values[sig.index]); + if (props.data[icID].input.values[sig.index-1] !== undefined) { + data.push(props.data[icID].input.values[sig.index-1]); } } } @@ -72,7 +72,6 @@ class WidgetPlotTable extends Component { // } render() { - let checkBoxes = []; let showLegend = false;