Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. The Axis do not match with the serie
Qt 6.11 is out! See what's new in the release blog

The Axis do not match with the serie

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 212 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • AlfacuA Offline
    AlfacuA Offline
    Alfacu
    wrote on last edited by
    #1

    Hi every Qt collage! I hope all be fine!

    Ok, I have a problem. I trying to plot a data (no important date: the data come from Arduino), and all is fine but, the the axis values do not math whit the series values.

    I tried some possibility.
    1.

    lineserie->append(count, value_a);
    chart->removeSeries(lineserie);       //to remove the before serie and add the new one
    chart->addSeries(lineserie);
    chart->addAxis(axisX, Qt::AlignBottom);
    chart->addAxis(axisY, Qt::AlignLeft);
    lineserie->attachAxis(axisX);
    lineserie->attachAxis(axisY);
    

    Should be work I think... using the attachAxis() function, I suppose that the axes refresh it sealf and/or the line inside the chart. But that do not happen!!!

    Screenshot_2020-04-02_23-08-52.png

    1. In the second try I refresh manually the values of the
      where count is the current data received ... I put tha range 10:34 (temperature)
    lineserie->append(count, value_a);
    chart->removeSeries(lineserie);         //to remove the before serie and add the new one
    axisX->setRange(0, count);
    axisY->setRange(10,34);
    chart->addSeries(lineserie);
    

    Screenshot_2020-04-02_23-10-13.png
    As you can see, there is a "non-connection" of the serie whit the axes and/or vie versa.

    The best.
    Al

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved