Unsolved Can I draw this type of chart using Qt charts ?
-
This is a screenshot of the battery stats from my phone:
Can I do something similar using Qt Charts ? The closest thing seems to be QHorizontalStackedBarSeries, but it doesn't seem to do the job.
-
Doubtful, but the implementation of such a chart would be trivial. You are wanting a 1-dimensional chart, where the second dimension is expressed as a color change. As near as I can tell, the Qt Charts are all 2-dimensional, or rotate around a center point.
-
@Kent-Dorfman said in Can I draw this type of chart using Qt charts ?:
Doubtful, but the implementation of such a chart would be trivial.
Nothing is trivial with QtCharts, and I don't kid around.
-
@kshegunov said in Can I draw this type of chart using Qt charts ?:
Nothing is trivial with QtCharts, and I don't kid around.
I was suggesting that it's probably NOT doable in Qt Charts, but that the custom widget to achive the desired result is kind of trivial.
-
Ah, okay then, my bad. Possible alternatives are QCustomPlot or Qwt if the licenses can be satisfied.
-
I ended up using QPainter's fillRect() on a QPixmap ... does the job.
Thanks guys :)