Because QChart is derived from QGraphicsView, you can also set the
setTransformationAnchor() to
QGraphicsView::AnchorUnderMouse and then scale() it.
On Mon, Jun 20, 2016 at 10:00 PM, Lorne Sturtevant wrote:
> I was able to find a way to zoom centred on the mouse. What I did was
> make use of
. It's not great but it will
work.
> Sent: Monday, June 20, 2016 at 5:54 PM
> From: "Lorne Sturtevant"
> To: interest
> Subject: [Interest] Handling zooming in QtCharts
>
> I have been using QtCharts and so far it's going ok. I can create basic
> cha
I was able to find a way to zoom centred on the mouse. What I did was
make use of the QChart::plotArea() function. With that function by
using ChartView::wheelEvent(), I could get where in the chart the zoom
is happening. I then did some math and set the new zoom for the chart
by adjusting the r
On 06/20/2016 08:44 PM, Vincent Hui wrote:
> Did you try Examples/Qt-5.7/qtcharts/charts/zoomlinechart ?
>
Yes I did. That example uses the default zoom which is always in the
centre of the chart.
--
Lorne Sturtevant
Sum Ergo Cogito
___
Interest maili
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