Number of tick marks on the axis in QBarCategoryAxis.
I managed to put string values on the x axis(datetime data is converted to a string).
Created on the x axis QBarCategoryAxis.
Everything would be fine, but I can't adjust tick marks on the axis.
To avoid being verbose more details here https://forum.qt.io/topic/118786/can...settickcount/2
If that's not possible, say so.
Since this idea is long-standing and time-consuming.
Re: Number of tick marks on the axis in QBarCategoryAxis.
Looking at the docs for QBarCategoryAxis the intended use of this Axis is for discrete categories on a bar chart, not an abbreviation of a continuous time line. Bar chart categories are typically few in number. This class renders as many tick marks as needed to separate the categories.
The QDateTimeAxis class is for displaying a continuous time line, which includes the two days of weekend (I assume) that result in gaps because you do not have data on those days.
You might be able to use QDateTimeAxis considering the answer in this Stack Overflow response: https://stackoverflow.com/questions/...goryaxis-in-qt.
Ultimately, I think you would end up writing your own QuantWeekdayTimeAxis subclass of QAbstractAxisClass to achieve what you want.
As a completely different approach look at Qwt, particularly the QwtPlotTradingCurve (also https://qwt.sourceforge.io/otherscreenshots.html). The learning curve here is steeper, but the flexibility is almost certainly there.
Re: Number of tick marks on the axis in QBarCategoryAxis.
Thank you, I did all this earlier.
Maybe you can still change the labels for the axes?