From 57084222c113f8bb20b7031bc3a2d391282f1645 Mon Sep 17 00:00:00 2001 From: Sonja Happ Date: Fri, 29 Jan 2021 10:41:35 +0100 Subject: [PATCH] backwards compatibility of plot --- src/widget/widget-plot/plot.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/widget/widget-plot/plot.js b/src/widget/widget-plot/plot.js index 1677915..6f314fe 100644 --- a/src/widget/widget-plot/plot.js +++ b/src/widget/widget-plot/plot.js @@ -207,6 +207,11 @@ class Plot extends React.Component { const lines = this.state.data.map((values, index) => { let signalID = this.props.signalIDs[index]; + + if(this.props.lineColors === undefined || this.props.lineColors === null){ + this.props.lineColors = [] // for backwards compatibility + } + if (typeof this.props.lineColors[signalID] === "undefined") { this.props.lineColors[signalID] = newLineColor(signalID); }