Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to set QScatterSeries axis to draw between them?
I want to know how I can bind chart & QScatterSeries to the axis max & min. I expect the chart to draw the points based on the axis rather than expanding itself.
axisX = new QValueAxis(); axisX->setTitleText("Elevation"); axisX->setLabelFormat("%i"); axisX->setTickCount(10); axisX->setRange( -20, 20); chart()->addAxis(axisX, Qt::AlignBottom); axisY = new QValueAxis(); axisY->setTitleText("Azimuth"); axisY->setLabelFormat("%i"); axisY->setTickCount(10); axisY->setRange( -20, 20); chart()->addAxis(axisY, Qt::AlignLeft); series0->setMarkerShape(QScatterSeries::MarkerShapeCircle); series0->setMarkerSize(10.1); series0->setColor( Qt::blue ); series0->append(10,5); series0->append(2.5,-5); series0->attachAxis(axisX); series0->attachAxis(axisY); chart()->addSeries(series0);
As you can see the points were not positioned base on the axis. In fact, the chart expands itself base on the max values of the points.
JoeCFD last edited by
what are the coordinates of these three blue points?
Top of the center is the indicator of series.
But other 2 points are :
JoeCFD last edited by JoeCFD
I tested 5.9.5 one which works fine.
Yes, it works. But it is not what I mentioned.
To see my point try to add X-axis and Y-axis range wider than the point values.