From 3ca1deaa695cc67d851bc4a3c40755265980d495 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Tue, 14 Feb 2023 06:40:47 +0800 Subject: [PATCH] cabana: set legend marker shape by the series type (#27296) set legend marker shape by the series type old-commit-hash: 507badb11717e23681ddaf7a3f54ebe348978aef --- tools/cabana/chartswidget.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/cabana/chartswidget.cc b/tools/cabana/chartswidget.cc index 5063ec9dea..aceef40556 100644 --- a/tools/cabana/chartswidget.cc +++ b/tools/cabana/chartswidget.cc @@ -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