SplineSeries QML Type

Stellt Daten als Spline-Diagramme dar. Mehr...

Import Statement: import QtCharts 2.8
In C++: QSplineSeries
Inherits:

XYSeries

Eigenschaften

Detaillierte Beschreibung

Eine Splineserie speichert die Datenpunkte und die Segmentkontrollpunkte, die QPainterPath zum Zeichnen eines Splines benötigt. Die Kontrollpunkte werden automatisch berechnet, wenn sich die Daten ändern. Der Algorithmus berechnet die Punkte so, dass der normale Spline gezeichnet werden kann.

Der folgende QML-Code zeigt, wie man ein einfaches Spline-Diagramm erstellt:

ChartView {
    title: "Spline Chart"
    anchors.fill: parent
    antialiasing: true

    SplineSeries {
        name: "Spline"
        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 }
    }
}

Eigenschaft Dokumentation

capStyle : Qt::PenCapStyle

Steuert den Kappenstil der Linie. Setzen Sie ihn auf einen der Werte Qt.FlatCap, Qt.SquareCap oder Qt.RoundCap. Standardmäßig ist der Kappenstil Qt.SquareCap.

Siehe auch Qt::PenCapStyle.


count : int

Die Anzahl der Datenpunkte in der Serie.


style : Qt::PenStyle

Steuert den Stil der Linie. Legen Sie einen der folgenden Werte fest: Qt.NoPen, Qt.SolidLine, Qt.DashLine, Qt.DotLine, Qt.DashDotLine oder Qt.DashDotDotLine. Die Verwendung von Qt.CustomDashLine wird von der QML-API nicht unterstützt. Standardmäßig ist der Stil Qt.SolidLine.

Siehe auch Qt::PenStyle.


width : real

Die Breite der Linie. Standardmäßig ist die Breite 2.0.


© 2025 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.