0

I am currently using QLineSeries to represent a temperature-over-time relation.

I have a temperature sensor connected. It sends data every minute.

The problem is, that the measurements are made in 20-minute periods after which the sensor is inactive for 60 minutes.

I indicate the start of a new series by setting the temperature value to -0xff. Now, how can I create a Graph with QtCharts that has a null value?

Right now even if I pass the value of -0xff to be drawn on the graph, it just draws it. I want it to stop drawing the currently started line and create a new one whenever a new measurement period starts.

jpo38
  • 20,821
  • 10
  • 70
  • 151
  • It would help if you could post a MCVE. A piece of code where you send `-0xff` to your `QLineSeries`, what you get displayed and what you would expect. – jpo38 Aug 28 '19 at 10:07

1 Answers1

1

I want it to stop drawing the currently started line and create a new one whenever a new measurement period starts.

Then you need to simply add one serie to every line you want to draw. When your sensor sends you 0xff, just stop populating the current QLineSeries and create a new one to draw the next set of data to be received.

jpo38
  • 20,821
  • 10
  • 70
  • 151