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

SplineSeries QML Type

Presents data as spline charts.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

SplineSeries QML Type

  • Import Statement: import QtCharts 2.4

  • Inherits:: XYSeries

  • Instantiates:: QSplineSeries

Detailed Description

A spline series stores the data points and the segment control points needed by QPainterPath to draw a spline. The control points are automatically calculated when the data changes. The algorithm computes the points so that the normal spline can be drawn.

Image non disponible

The following QML code shows how to create a simple spline chart:

 
Sélectionnez
ChartView {
    title: "Spline"
    anchors.fill: parent
    antialiasing: true

    SplineSeries {
        name: "SplineSeries"
        XYPoint { x: 0; y: 0.0 }
        XYPoint { x: 1.1; y: 3.2 }
        XYPoint { x: 1.9; y: 2.4 }
        XYPoint { x: 2.1; y: 2.1 }
        XYPoint { x: 2.9; y: 2.6 }
        XYPoint { x: 3.4; y: 2.3 }
        XYPoint { x: 4.1; y: 3.1 }
    }
}

Property Documentation

 

capStyle : Qt::PenCapStyle

Controls the cap style of the line. Set to one of Qt.FlatCap, Qt.SquareCap or Qt.RoundCap. By default, the cap style is Qt.SquareCap.

See Also

See also Qt::PenCapStyle

count : int

The number of data points in the series.

style : Qt::PenStyle

Controls the style of the line. Set to one of Qt.NoPen, Qt.SolidLine, Qt.DashLine, Qt.DotLine, Qt.DashDotLine, or Qt.DashDotDotLine. Using Qt.CustomDashLine is not supported in the QML API. By default, the style is Qt.SolidLine.

See Also

See also Qt::PenStyle

width : real

The width of the line. By default, the width is 2.0.

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