Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Update axes in chart
Forum Updated to NodeBB v4.3 + New Features

Update axes in chart

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 257 Views
  • 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.
  • I Offline
    I Offline
    IknowQT
    wrote on last edited by
    #1

    beeb9018-ee30-4d07-8a92-ba0f6bded801-image.png

    e9ec2986-0031-4187-9eb9-22eb58cea06f-image.png

    There are 2 examples provided by qt

    The first picture is a chart using QTableModel.
    The second picture is an example of zooming in, zooming out, and moving the chart using mouse events.

    In the second example, the ranges of the x and y axes are automatically updated when the mouse is moved. However, in the first example, the axis range is fixed.

    What I want ideally is to put the functionality of the second example into the first.
    If there is data in the table, the axes should also be updated automatically.
    How can I access it?

    I 1 Reply Last reply
    0
    • I IknowQT

      beeb9018-ee30-4d07-8a92-ba0f6bded801-image.png

      e9ec2986-0031-4187-9eb9-22eb58cea06f-image.png

      There are 2 examples provided by qt

      The first picture is a chart using QTableModel.
      The second picture is an example of zooming in, zooming out, and moving the chart using mouse events.

      In the second example, the ranges of the x and y axes are automatically updated when the mouse is moved. However, in the first example, the axis range is fixed.

      What I want ideally is to put the functionality of the second example into the first.
      If there is data in the table, the axes should also be updated automatically.
      How can I access it?

      I Offline
      I Offline
      IknowQT
      wrote on last edited by
      #2

      @IknowQT said in Update axes in chart:

      beeb9018-ee30-4d07-8a92-ba0f6bded801-image.png

      e9ec2986-0031-4187-9eb9-22eb58cea06f-image.png

      There are 2 examples provided by qt

      The first picture is a chart using QTableModel.
      The second picture is an example of zooming in, zooming out, and moving the chart using mouse events.

      In the second example, the ranges of the x and y axes are automatically updated when the mouse is moved. However, in the first example, the axis range is fixed.

      What I want ideally is to put the functionality of the second example into the first.
      If there is data in the table, the axes should also be updated automatically.
      How can I access it?

      It was resolved by calling the createDefaultAxes() function.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved