Qt World Summit: Submit your Presentation

QCharts - create a break (null value) in QLineSeries

  • 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 - so It can display multiple measurements period on the same chart?

    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 without using separate QLineSeries.

  • So is there any solution?

  • Still waiting for help…

  • So is there anyone here?

  • Lifetime Qt Champion

    @Szustarol Probably nobody has an answer to your question.
    Did you try to search on Internet? StackOverflow?

  • @jsulm Yes I did. I wouldn't ask a question if it was answered, in fact I have asked the same question on StackOverflow as well.

  • Moderators

    QCharts is not a topic many user will have experience with. This is partly due to the inflexibility that QCharts has, and that it used to be Commercial only.
    I assume most people will have more experience with 3rd Party Qt plotters like QCustomPlot or Qwt or something similar

    The way I would do it is, with a new QLineSeries, but you explicitly states that you don't want to do that.

Log in to reply