Qt literacy-QLineSeries theory summary

QLineSeries theory summary

I. Overview

QLineSeries is actually the implementation class of QXYSeries, which implements a line graph.

Basically all the functions are available in QXYSeries, so we only need to learn to use QXYSeries. Controlling the left and right movement and zooming of this graph is what QChart should do. QLineSeries only maintains this data point and does not interact. The color of this line, the click response and so on.

It is recommended to take a look at my Qt literacy-QXYSeries theory summary

insert image description here

Two, use

The following is actually a simple addition of data points.

  QLineSeries* series = new QLineSeries();
  series->append(0, 6);
  series->append(2, 4);
  ...
  chart->addSeries(series);

Guess you like

Origin blog.csdn.net/qq_43680827/article/details/130229936