Having sued QtCharts in the past, I can say they are rather poorly implemented. I was able to get the charts on the screen but stuff was constantly ilided text.
Anyway, to do what you need, you probably have to render() it at a higher DPI than needed into an image then zoom in on the image. It's not great but it will work. > Sent: Monday, June 20, 2016 at 5:54 PM > From: "Lorne Sturtevant" <dra...@shaw.ca> > To: interest <interest@qt-project.org> > Subject: [Interest] Handling zooming in QtCharts > > I have been using QtCharts and so far it's going ok. I can create basic > charts without problems. I am noticing some holes in the API which I > imagine is just due to the fact that it's new. > > One big problem I'm having is with zooming. The functions > QChart::zoomIn() and QChart::zoomOut() only allow zooming from the > center of the chart. I use the mouse wheel to zoom and I would like > that to be done at the mouse's position. So far, I cannot find a way to > do this. > > My first idea was to subclass QChart and just add a function to do it > myself. The problem with this, is that all the data I need to calculate > the zoom point is in QChartPrivate, so that won't work. I also thought > about changing the range of the axis based on where the mouse is, but I > can't see a way of getting the location of the grid lines to do an > accurate calculation. All the data I need is again private. > > So my question is, how would I do this? How can I zoom the chart around > the position of the mouse without accessing any of the private data from > the QtChart package? Is there some method I'm missing? Or is the API > just not able to do this right now? > > -- > Lorne Sturtevant > Sum Ergo Cogito > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest