SplineSeries QML Type
Stellt Daten als Spline-Diagramme dar. Mehr...
| Import Statement: | import QtCharts 2.12 |
| In C++: | QSplineSeries |
| Inherits: | |
| Status: | Deprecated |
Dieser Typ ist veraltet. Wir raten dringend davon ab, ihn in neuem Code zu verwenden.
Eigenschaften
Ausführliche Beschreibung
Eine Spline-Reihe speichert die Datenpunkte und die Segmentkontrollpunkte, die von „ QPainterPath “ zum Zeichnen einer Spline benötigt werden. Die Kontrollpunkte werden automatisch berechnet, wenn sich die Daten ändern. Der Algorithmus berechnet die Punkte so, dass die 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 }
}
}Dokumentation der Eigenschaften
capStyle : Qt::PenCapStyle
Steuert den Endstil der Linie. Setzen Sie den Wert auf einen der folgenden Werte: Qt.FlatCap, Qt.SquareCap oder Qt.RoundCap. Standardmäßig ist der Endstil „Qt.SquareCap“ eingestellt.
Siehe auch Qt::PenCapStyle.
count : int
Die Anzahl der Datenpunkte in der Reihe.
style : Qt::PenStyle
Setzen Sie den Wert auf eine der folgenden Optionen: Qt.NoPen, Qt.SolidLine, Qt.DashLine, Qt.DotLine, Qt.DashDotLine oder Qt.DashDotDotLine. Die Verwendung von Qt.CustomDashLine wird in der QML-API nicht unterstützt. Standardmäßig ist der Stil „Qt.SolidLine“ eingestellt.
Siehe auch Qt::PenStyle.
width : real
Die Breite der Linie. Standardmäßig beträgt die Breite 2,0.
© 2026 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.