En esta página

SplineSeries QML Type

Muestra los datos en forma de gráficos de splines. Más...

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

XYSeries

Status: Deprecated

Este tipo está obsoleto. Recomendamos encarecidamente no utilizarlo en código nuevo.

Propiedades

Descripción detallada

Una serie de splines almacena los puntos de datos y los puntos de control de los segmentos que necesita QPainterPath para trazar una spline. Los puntos de control se calculan automáticamente cuando cambian los datos. El algoritmo calcula los puntos de manera que se pueda trazar la spline normal.

Gráfico de splines con una única línea curva que sube, baja y vuelve a subir

El siguiente código QML muestra cómo crear un gráfico de splines sencillo:

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 remate de la línea. Se puede establecer en uno de los siguientes valores: Qt.FlatCap, Qt.SquareCap o Qt.RoundCap. Por defecto, el estilo de remate 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. Se debe establecer en uno de los siguientes valores: Qt.NoPen, Qt.SolidLine, Qt.DashLine, Qt.DotLine, Qt.DashDotLine o Qt.DashDotDotLine. El uso de Qt.CustomDashLine no es compatible con la API de QML. Por defecto, el estilo es Qt.SolidLine.

Véase también Qt::PenStyle.

width : real

El ancho de la línea. Por defecto, el ancho es 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.