    header_layout->addWidget(remove_btn);
    chart_layout->addWidget(header);
  
    QLineSeries *series = new QLineSeries();
    series->setUseOpenGL(true);
    QChart *chart = new QChart();
    chart->setTitle(sig_name);
 
</s> remove   auto chart = new QChart();
 </s> add   QChart *chart = new QChart(); </s> remove   QLineSeries *series = (QLineSeries *)chart_view->chart()->series()[0];
 </s> add   QLineSeries *series = (QLineSeries *)chart()->series()[0]; </s> remove   QStackedLayout *stacked = new QStackedLayout(this);
  stacked->setStackingMode(QStackedLayout::StackAll);
 </s> add   QVBoxLayout *main_layout = new QVBoxLayout(this); </s> remove   chart_view = new ChartView(chart);
  chart_view->setFixedHeight(300);
  chart_view->setRenderHint(QPainter::Antialiasing);
  chart_view->setRubberBand(QChartView::HorizontalRubberBand);
  if (auto rubber = chart_view->findChild<QRubberBand *>()) {
 </s> add   track_line = new QGraphicsLineItem(chart);
  track_line->setPen(QPen(Qt::gray, 1, Qt::DashLine));
  value_text = new QGraphicsSimpleTextItem(chart);
  value_text->setBrush(Qt::gray);
  line_marker = new QGraphicsLineItem(chart);
  line_marker->setPen(QPen(Qt::black, 2));

  setChart(chart);

  setRenderHint(QPainter::Antialiasing);
  setRubberBand(QChartView::HorizontalRubberBand);
  if (auto rubber = findChild<QRubberBand *>()) {
  chart_view = new ChartView(id, sig_name, this);
  chart_view->setFixedHeight(300);
  chart_layout->addWidget(chart_view);
  chart_layout->addStretch();

  main_layout->addWidget(chart_widget);

  setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
}

// ChartView

ChartView::ChartView(const QString &id, const QString &sig_name, QWidget *parent)
    : id(id), sig_name(sig_name), QChartView(nullptr, parent) {
    header_layout->addWidget(remove_btn);
    chart_layout->addWidget(header);
  
  chart_view = new ChartView(id, sig_name, this);
  chart_view->setFixedHeight(300);
  chart_layout->addWidget(chart_view);
  chart_layout->addStretch();

  main_layout->addWidget(chart_widget);

  setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
}

// ChartView

ChartView::ChartView(const QString &id, const QString &sig_name, QWidget *parent)
    : id(id), sig_name(sig_name), QChartView(nullptr, parent) {
    QLineSeries *series = new QLineSeries();
    series->setUseOpenGL(true);
    QChart *chart = new QChart();
    chart->setTitle(sig_name);
keep keep add keep keep keep keep
 Cabana: display the (x,y) values while MouseMove on the chart (#26064) 
tools/cabana/chartswidget.cc