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. Multiple Axes
Forum Updated to NodeBB v4.3 + New Features

Multiple Axes

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 195 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.
  • G Offline
    G Offline
    genli
    wrote on last edited by
    #1

    I would like to add to my graph two axes x and y which go through 0 I have tried this code but it does not display the desired result

                              QSplineSeries *series1 = new QSplineSeries;
                              *series1 << QPointF(0, 0);
                              chart->addSeries(series1);
    

    QValueAxis *axisX = new QCategoryAxis;
    QValueAxis *axisY = new QCategoryAxis;
    axisY->setLinePenColor(series1->pen().color());
    axisX->setLinePenColor(series1->pen().color());
    chart->addAxis(axisY, Qt::AlignLeft);
    chart->addAxis(axisX, Qt::AlignLeft);
    series1->attachAxis(axisX);
    series1->attachAxis(axisY);

    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