Multiple Axes
Unsolved
General and Desktop
-
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);