Solved How to change the increment of QAbstractAxis?
-
Hello,
I have this chart:
However, I would like to change the increment of the x Axis to one so that it goes like {1,2,3,4,5...,12,13}. I have searched around the documentation of QAbstractAxis but I haven't been able to find anything that does something like that (maybe I'm just overlooking it, though). Is there a way to do this? (Also, it would be good if I could remove the .0 at the y Axis because I'm working with integers anyways). -
hi @El3ctroGh0st
you should be able to modify the axes withQValueAxis::setRange(qreal min, qreal max)
andQValueAxis::setTickCount(int count)
Also you might want to take a look atvoid QValueAxis::applyNiceNumbers()
may help on your case as well -
@J.Hilk That fixed it, thank you!!