Scatter3D QML Type

3D scatter graph. More...

Import Statement: import QtGraphs
Inherits:

AbstractGraph3D

Status: Technical Preview

Properties

Methods

Detailed Description

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

See Simple Scatter Graph for more thorough usage example.

See also Scatter3DSeries, ScatterDataProxy, Bars3D, Surface3D, and Qt Graphs C++ Classes for 3D.

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.


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.


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 AbstractGraph3D::hasSeries().


void removeSeries(Scatter3DSeries series)

Remove the series from the graph.

See also AbstractGraph3D::hasSeries().