cabana: set legend marker shape by the series type (#27296)

set legend marker shape by the series type
old-commit-hash: 507badb11717e23681ddaf7a3f54ebe348978aef
This commit is contained in:
Dean Lee
2023-02-14 06:40:47 +08:00
committed by GitHub
parent 8de2aa50c7
commit 3ca1deaa69
+2
View File
@@ -780,8 +780,10 @@ QXYSeries *ChartView::createSeries(QAbstractSeries::SeriesType type, QColor colo
QXYSeries *series = nullptr;
if (type == QAbstractSeries::SeriesTypeLine) {
series = new QLineSeries(this);
chart()->legend()->setMarkerShape(QLegend::MarkerShapeRectangle);
} else {
series = new QScatterSeries(this);
chart()->legend()->setMarkerShape(QLegend::MarkerShapeCircle);
}
series->setColor(color);
// TODO: Due to a bug in CameraWidget the camera frames