Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    Unsolved QChart Zoom Levels

    General and Desktop
    2
    3
    1689
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Matthias Abt last edited by

      Hello,

      I am trying to make zooming with a QChart a little bit more convenient for the user.
      If the user hast zoomed multiple times into the chart, he should be able to go back each zooming step/level he made when clicking the right mousebutton.

      I tried to implement it myself, but i haven't found a way to solve this.
      What i'm imagining is something like this:

      https://gyazo.com/c10c84e3402a8928941ea2eefe1ea720

      1 Reply Last reply Reply Quote 0
      • E
        eti_nne last edited by

        Have you take a look at this example : http://doc.qt.io/qt-5/qtcharts-zoomlinechart-example.html ?

        You can exand it with the use of a QStack (http://doc.qt.io/qt-5/qstack.html), to store the different zoom level.

        And add RightClick event handler to use the zoom on the top of your stack.

        1 Reply Last reply Reply Quote 1
        • M
          Matthias Abt last edited by

          Yes i looked at that example.
          The zooming and storing is not the problem.
          But i wonder what values i should store and how i should deal with multiple different Axis types like QValueAxis and QDateAxis.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post