Skip to content
Snippets Groups Projects
Commit 6552e61a authored by tobiglaser's avatar tobiglaser
Browse files

fix no more LegendMarkers when Series has no name

parent 6e373dbb
No related branches found
No related tags found
No related merge requests found
...@@ -144,7 +144,8 @@ public: ...@@ -144,7 +144,8 @@ public:
tooltip.replace(tooltip.find("@X"), 2, "%1"); tooltip.replace(tooltip.find("@X"), 2, "%1");
tooltip.replace(tooltip.find("@Y"), 2, "%2"); tooltip.replace(tooltip.find("@Y"), 2, "%2");
} }
emit s_plotXYSeries(s, plot, properties.onTop, properties.legend, tooltip.c_str()); bool legend = properties.legend & !properties.name.empty();
emit s_plotXYSeries(s, plot, properties.onTop, legend, tooltip.c_str());
} }
void plotValues(std::vector<float>& values, int plot, const cute::PlotProperties& properties = {}) void plotValues(std::vector<float>& values, int plot, const cute::PlotProperties& properties = {})
...@@ -179,7 +180,8 @@ public: ...@@ -179,7 +180,8 @@ public:
series->setName(properties.name.c_str()); series->setName(properties.name.c_str());
series->moveToThread(QApplication::instance()->thread()); series->moveToThread(QApplication::instance()->thread());
emit s_plotBarSeries(series, plot, properties.onTop, properties.legend); bool legend = properties.legend & !properties.name.empty();
emit s_plotBarSeries(series, plot, properties.onTop, legend);
} }
void highlightValue(float value, int plot, const cute::Color& color) void highlightValue(float value, int plot, const cute::Color& color)
...@@ -221,7 +223,8 @@ public: ...@@ -221,7 +223,8 @@ public:
s->setPen(pen); s->setPen(pen);
s->setName(properties.name.c_str()); s->setName(properties.name.c_str());
s->moveToThread(QApplication::instance()->thread()); s->moveToThread(QApplication::instance()->thread());
emit s_plotXYSeries(s, plot, properties.onTop, properties.legend); bool legend = properties.legend & !properties.name.empty();
emit s_plotXYSeries(s, plot, properties.onTop, legend);
} }
void resetPlot(int plot) { emit s_resetPlot(plot); } void resetPlot(int plot) { emit s_resetPlot(plot); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment