From 2515bf5fa5fe8a576229e397ca6aa18742714f98 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Thu, 17 Sep 2020 12:19:47 -0700 Subject: [PATCH] Small tweaks to the plot plugin Signed-off-by: Louise Poubel --- include/ignition/gui/qml/Chart.qml | 2 ++ src/plugins/plotting/TransportPlotting.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/ignition/gui/qml/Chart.qml b/include/ignition/gui/qml/Chart.qml index 7d9279681..cd3a259d7 100644 --- a/include/ignition/gui/qml/Chart.qml +++ b/include/ignition/gui/qml/Chart.qml @@ -515,6 +515,8 @@ Rectangle { */ function appendPoint(_fieldID, _x, _y) { + if (!chart.serieses[_fieldID]) + return; // if this is the first point (if the chart is empty): // set the min/max according to that point's coordinates diff --git a/src/plugins/plotting/TransportPlotting.cc b/src/plugins/plotting/TransportPlotting.cc index a836bc68a..4c2b858a6 100644 --- a/src/plugins/plotting/TransportPlotting.cc +++ b/src/plugins/plotting/TransportPlotting.cc @@ -29,7 +29,7 @@ TransportPlotting::~TransportPlotting() void TransportPlotting::LoadConfig(const tinyxml2::XMLElement *) { if (this->title.empty()) - this->title = "Plotting"; + this->title = "Transport plotting"; } //////////////////////////////////////////