If you want to keep dates/times as x axis labels, you will probably have to assign own tick marks
(QCPAxis::setTickVector
, setTickVectorLabels
). Remember to disable auto ticks for this (QCPAxis::setAutoTicks
, setAutoTickLabels
). This way you can cut out the weekends in your data and compensate for the 2-day-jumps via custom tick marks/labels.
A suitable key coordinate must be found though, which describes your data continuously. I recommend something like "workdays", which just counts upwards in steps of 1 per day and leaves out weekends. Your tick label generation must then be able to generate dates from the workdays coordinate which shouldn't be too hard. Just add 2 days for every 5 workdays (e.g. use the integer division workdays/5 for that) and then use QDateTime::addDays
or addSecs
if you need sub-day-precision to transform that into a proper QDateTime.