QCharts is probably the most poorly-designed library in all of Qt. You can't customize it in any way because none of the classes have virtual methods and there is no way to override them through inheritance to change their behavior.
I think the only way to solve your problem is to create a third QLineSeries that contains the points in the section you want to highlight, and to remove those points from the green series. You probably need to split the green series into three separate series - one before the highlight, the highlight, and one after, because if you don't there will be a line drawn through the highlight region that connects the two parts on the non-highlighted series.
You might want to check out QCustomPlot instead. I have been able to customize it to do almost everything I need. I gave up on QCharts long ago when I realized there was nothing I could change. Literally everything is locked-in way down into the implementation.




Reply With Quote

Bookmarks