Surface3D QML Type
Describes the usage of the 3D surface graph. More...
Import Statement: | import QtDataVisualization 1.14 |
Since: | QtDataVisualization 1.0 |
Inherits: |
Properties
- axisX : ValueAxis3D
- axisY : ValueAxis3D
- axisZ : ValueAxis3D
- flipHorizontalGrid : bool
- selectedSeries : Surface3DSeries
- seriesList : list<Surface3DSeries>
Methods
- void addSeries(series)
- void removeSeries(series)
Detailed Description
This type enables developers to render surface plots in 3D with Qt Quick 2.
You will need to import the data visualization module to use this type:
import QtDataVisualization 1.2
After that you can use Surface3D in your qml files:
import QtQuick 2.0 import QtDataVisualization 1.2 Item { width: 640 height: 480 Surface3D { width: parent.width height: parent.height Surface3DSeries { itemLabelFormat: "Pop density at (@xLabel N, @zLabel E): @yLabel" ItemModelSurfaceDataProxy { itemModel: dataModel // Mapping model roles to surface series rows, columns, and values. rowRole: "longitude" columnRole: "latitude" yPosRole: "pop_density" } } } ListModel { id: dataModel ListElement{ longitude: "20"; latitude: "10"; pop_density: "4.75"; } ListElement{ longitude: "21"; latitude: "10"; pop_density: "3.00"; } ListElement{ longitude: "22"; latitude: "10"; pop_density: "1.24"; } ListElement{ longitude: "23"; latitude: "10"; pop_density: "2.53"; } ListElement{ longitude: "20"; latitude: "11"; pop_density: "2.55"; } ListElement{ longitude: "21"; latitude: "11"; pop_density: "2.03"; } ListElement{ longitude: "22"; latitude: "11"; pop_density: "3.46"; } ListElement{ longitude: "23"; latitude: "11"; pop_density: "5.12"; } ListElement{ longitude: "20"; latitude: "12"; pop_density: "1.37"; } ListElement{ longitude: "21"; latitude: "12"; pop_density: "2.98"; } ListElement{ longitude: "22"; latitude: "12"; pop_density: "3.33"; } ListElement{ longitude: "23"; latitude: "12"; pop_density: "3.23"; } ListElement{ longitude: "20"; latitude: "13"; pop_density: "4.34"; } ListElement{ longitude: "21"; latitude: "13"; pop_density: "3.54"; } ListElement{ longitude: "22"; latitude: "13"; pop_density: "1.65"; } ListElement{ longitude: "23"; latitude: "13"; pop_density: "2.67"; } } }
See Qt Quick 2 Surface Example for more thorough usage example.
See also Surface3DSeries, ItemModelSurfaceDataProxy, Bars3D, Scatter3D, and Qt Data Visualization C++ Classes.
Property Documentation
axisX : ValueAxis3D |
The active x-axis.
If an axis is not given, a temporary default axis with no labels and an automatically adjusting range is created. This temporary axis is destroyed if another axis is explicitly set to the same orientation.
axisY : ValueAxis3D |
The active y-axis.
If an axis is not given, a temporary default axis with no labels and an automatically adjusting range is created. This temporary axis is destroyed if another axis is explicitly set to the same orientation.
axisZ : ValueAxis3D |
The active z-axis.
If an axis is not given, a temporary default axis with no labels and an automatically adjusting range is created. This temporary axis is destroyed if another axis is explicitly set to the same orientation.
flipHorizontalGrid : bool |
In some use cases the horizontal axis grid is mostly covered by the surface, so it can be more useful to display the horizontal axis grid on top of the graph rather than on the bottom. A typical use case for this is showing 2D spectrograms using orthoGraphic projection with a top-down viewpoint.
If false
, the horizontal axis grid and labels are drawn on the horizontal background of the graph. If true
, the horizontal axis grid and labels are drawn on the opposite side of the graph from the horizontal background. Defaults to false
.
This property was introduced in QtDataVisualization 1.2.
selectedSeries : Surface3DSeries |
The selected series or null. If selectionMode has the SelectionMultiSeries
flag set, this property holds the series which owns the selected point.
[default] seriesList : list<Surface3DSeries> |
This property holds the series of the graph. By default, this property contains an empty list. To set the series, either use the addSeries() function or define them as children of the graph.
Method Documentation
void addSeries(series) |
Adds the series to the graph.
void removeSeries(series) |
Removes the series from the graph.
© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.