Scatter3D QML Type

3D scatter graph. 更多...

import 语句: import QtGraphs
继承:

AbstractGraph3D

状态: 技术预览

特性

方法

详细描述

This type enables developers to render scatter graphs in 3D with Qt Quick.

You will need to import Qt Graphs module to use this type:

import QtGraphs
					

After that you can use Scatter3D in your qml files:

import QtQuick
import QtGraphs
Item {
    width: 640
    height: 480
    Scatter3D {
        width: parent.width
        height: parent.height
        Scatter3DSeries {
            ItemModelScatterDataProxy {
                itemModel: dataModel
                // Mapping model roles to scatter series item coordinates.
                xPosRole: "xPos"
                yPosRole: "yPos"
                zPosRole: "zPos"
            }
        }
    }
    ListModel {
        id: dataModel
        ListElement{ xPos: "2.754"; yPos: "1.455"; zPos: "3.362"; }
        ListElement{ xPos: "3.164"; yPos: "2.022"; zPos: "4.348"; }
        ListElement{ xPos: "4.564"; yPos: "1.865"; zPos: "1.346"; }
        ListElement{ xPos: "1.068"; yPos: "1.224"; zPos: "2.983"; }
        ListElement{ xPos: "2.323"; yPos: "2.502"; zPos: "3.133"; }
    }
}
					

Simple Scatter Graph for more thorough usage example.

另请参阅 Scatter3DSeries , ScatterDataProxy , Bars3D , Surface3D ,和 Qt Graphs C++ Classes for 3D .

特性文档编制

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.

selectedSeries : Scatter3DSeries

The selected series or null.

seriesList : list < Scatter3DSeries > [default]

This property holds the series of the graph. By default, this property contains an empty list. To set the series, either use the addSeries () method or define them as children of the graph.

方法文档编制

void addSeries ( Scatter3DSeries series )

添加 series to the graph. A graph can contain multiple series, but has only one set of axes. If the newly added series has specified a selected item, it will be highlighted and any existing selection will be cleared. Only one added series can have an active selection.

另请参阅 AbstractGraph3D::hasSeries ().

void removeSeries ( Scatter3DSeries series )

Remove the series from the graph.

另请参阅 AbstractGraph3D::hasSeries ().