IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

Scatter3D QML Type

3D scatter graph.

This type was introduced in QtDataVisualization 1.0.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

Scatter3D QML Type

  • Import Statement: import QtDataVisualization 1.4

  • Since:: QtDataVisualization 1.0

  • Inherits:: AbstractGraph3D

  • Group: Scatter3D is part of datavisualization_qml

Detailed Description

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

You will need to import data visualization module to use this type:

 
Sélectionnez
import QtDataVisualization 1.2

After that you can use Scatter3D in your qml files:

 
Sélectionnez
import QtQuick 2.0
import QtDataVisualization 1.2

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"; }
    }
}

See Qt Quick 2 Scatter Example for more thorough usage example.

See Also

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.

selectedSeries : Scatter3DSeries

The selected series or null.

[default] seriesList : list<Scatter3DSeries>

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.

Method Documentation

 

void addSeries(Scatter3DSeries series)

Adds the 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.

See Also

void removeSeries(Scatter3DSeries series)

Remove the series from the graph.

See Also

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+