Update axes in chart
-
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? -
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?@IknowQT said in Update axes in chart:
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.