qt5 customplot 时间轴显示
哪位大神帮忙解决一下 qcustomplot 图形显示的时候时间轴异常
QBrush backRole;
backRole.setColor("skyblue");
backRole.setStyle(Qt::SolidPattern);
ui->customPlot->setBackground(backRole);
ui->customPlot->xAxis->setLabel("time");
ui->customPlot->yAxis->setLabel("value");//坐标轴名称
ui->customPlot->xAxis->setLabelColor("red");//坐标轴名称颜色
ui->customPlot->yAxis->setLabelColor("red");
ui->customPlot->xAxis->setTickLabelColor(QColor("green"));//坐标轴颜色
ui->customPlot->yAxis->setTickLabelColor(QColor("green"));
ui->customPlot->xAxis->setTickLabelRotation(-40);//坐标轴倾斜角
long long int max_time,min_time,max_value,min_value;
min_time = 20170101011234;//年月日 时:分:秒
max_time = 20170228235959;
ui->customPlot->xAxis->setRange(min_time, max_time);
ui->customPlot->yAxis->setRange(min_value, max_value);
QSharedPointer<QCPAxisTickerDateTime> dateTicker(new QCPAxisTickerDateTime);
dateTicker->setDateTimeFormat("yyyy-MM-dd hh:mm:ss");
ui->customPlot->xAxis->setTicker(dateTicker);
图片传不上来,这是图片地址
https://user.qzone.qq.com/1137462397/main