Hi,
I have problems with x-axis labels that overlap when the graph rescales. Roughly, the widget is constructed like this:
QSharedPointer<QCPAxisTickerFixed> xAxisTicker(new QCPAxisTickerFixed); xAxis->setTicker(xAxisTicker); xAxisTicker.get()->setScaleStrategy(QCPAxisTickerFixed::ssMultiples); xAxisTicker.get()->setTickStep(10.0); ... v_graph = addGraph();
Each time when the underlying data set grows, I clear all items, set the graph data and call axis rescaling:
clearItems(); v_graph->setData(hfr_position, hfr_value); ... xAxis->setRange(minPosition - pulseDuration, maxPosition + pulseDuration); ... replot()
The problem is, that sometimes labels are placed correctly:
https://invent.kde.org/education/kstars/uploads/bd7985b5d1e1db93042f58eebbef9493/Bildschirmfoto_vom_2021-07-07_12-50-46.png
and two iterations later not:
https://invent.kde.org/education/kstars/uploads/b7796d6d9fea77272b48f5696ae74064/Bildschirmfoto_vom_2021-07-07_12-51-05.png
Bug or feature? Help appreciated!