I need to plot a chart, whose axis X has data type of date-time
.
I'm trying to use QtCharts
to do so, but I find that QtCharts::QDateTimeAxis
can only process consecutive data(the X axis is proportional and consecutive).
For example, given a LineSeries:
{
{ "20:15:00", 123.0 },
{ "20:15:01", 124.0 },
{ "21:00:00", 125.0 },
{ "21:00:01", 126.0 },
}
If I use a QDateTimeAxis
as the X-axis, I would get too more white-space range on X axis, not only 4 spots.
Even though there is no data between "20:15:02" to "20:59::59", QChart
still gives the space of a lot of slots in X axis that have no meaning.
Can we plot a chart that has non-consecutive X-axis with Qt
?
If Qt
cannot do it, is there a open-source C++ library that can do the same?