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

set legend marker shape by the series type
old-commit-hash: 507badb117
beeps
Dean Lee 2 years ago committed by GitHub
parent 8de2aa50c7
commit 3ca1deaa69
  1. 2
      tools/cabana/chartswidget.cc

@ -780,8 +780,10 @@ QXYSeries *ChartView::createSeries(QAbstractSeries::SeriesType type, QColor colo
QXYSeries *series = nullptr; QXYSeries *series = nullptr;
if (type == QAbstractSeries::SeriesTypeLine) { if (type == QAbstractSeries::SeriesTypeLine) {
series = new QLineSeries(this); series = new QLineSeries(this);
chart()->legend()->setMarkerShape(QLegend::MarkerShapeRectangle);
} else { } else {
series = new QScatterSeries(this); series = new QScatterSeries(this);
chart()->legend()->setMarkerShape(QLegend::MarkerShapeCircle);
} }
series->setColor(color); series->setColor(color);
// TODO: Due to a bug in CameraWidget the camera frames // TODO: Due to a bug in CameraWidget the camera frames

Loading…
Cancel
Save