En esta página

SplineSeries QML Type

Presenta los datos como gráficos spline. Más...

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

XYSeries

Propiedades

Descripción detallada

Una serie spline almacena los puntos de datos y los puntos de control del segmento que QPainterPath necesita para dibujar una spline. Los puntos de control se calculan automáticamente cuando cambian los datos. El algoritmo calcula los puntos para poder dibujar la spline normal.

El siguiente código QML muestra cómo crear un gráfico spline simple:

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

Documentación de Propiedades

capStyle : Qt::PenCapStyle

Controla el estilo de tapa de la línea. Establézcalo en Qt.FlatCap, Qt.SquareCap o Qt.RoundCap. Por defecto, el estilo de tapa es Qt.SquareCap.

Véase también Qt::PenCapStyle.

count : int

El número de puntos de datos de la serie.

style : Qt::PenStyle

Controla el estilo de la línea. Establece uno de los siguientes valores: Qt.NoPen, Qt.SolidLine, Qt.DashLine, Qt.DotLine, Qt.DashDotLine o Qt.DashDotDotLine. La API QML no admite el uso de Qt.CustomDashLine. Por defecto, el estilo es Qt.SolidLine.

Véase también Qt::PenStyle.

width : real

La anchura de la línea. Por defecto, la anchura es de 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.