Qt Graphs Interacting with Data in 3D | Qt Graphs | Qt 6.9.2

- Qt 6.9
- Qt Graphs
- Qt Graphs Overview for 3D
- Qt Graphs Interacting with Data in 3D
- Qt Graphs | Commercial or GPLv3

Data Handling ◦ Migration from Qt DataVisualization

# Qt Graphs Interacting with Data in 3D

## Interacting with Data

End users can use a mouse or touch input to interact with the rendered graph:

- To rotate data, hold down the right mouse button and move the mouse, or use the tap-and-move touch gesture.
- To zoom graph, use the mouse wheel or pinch touch gesture.
- To select, click the left mouse button or tap-and-hold touch gesture.

Qt Graphs has default handlers for mouse actions and touch gestures. When using customized input handlers, disable the default handlers. The Axis Handling example, in the Axis Dragging tab, illustrates how to use a custom input handler to drag an axis label to move the visible part of the data.

In addition to perspective projection, orthographic projection can be used to create 2D graphs by replacing the default input handler with one that does not allow rotating the graph and setting the camera to view the graph directly from the side or from the top.

## Data Selection Modes

All graph types support selecting a single data item - a bar, a scatter item, or a surface point - using the mouse, touch, and programmatically via the series APIs. The selected item is highlighted in the rendered graph, and selection causes the emission of a series-specific signal for this purpose, for example, QBar3DSeries::selectedBarChanged(), which the application can handle.

Bar and surface graphs support slice selection modes, where a selected row or column is drawn in a separate viewport as a pseudo-2D graph. This makes it easier to see the actual values of a single row or column.

The bar graph supports highlighting the whole row and column of the selected bar without opening the slice view. The bar graph also supports selecting and slicing a whole row and column by clicking the axis label, based on the selection mode.

When multiple series are added to a graph, selecting an item in one of them will clear the selection on the other series. There is a multiseries option as well for bars and surface, which will select each series in the selected position.

Data Handling ◦ Migration from Qt DataVisualization