Qt 5.7 | Qt Charts | QML Types | SplineSeries QML Type

Qt 5.7.1 Reference Documentation

# SplineSeries QML Type

The SplineSeries type is used for making spline charts. More...

Import Statement: | import QtCharts 2.1
Instantiates: | QSplineSeries
Inherits: | XYSeries

- List of all members, including inherited members

## Properties

- capStyle : Qt::PenCapStyle
- style : Qt::PenStyle
- width : real

## Detailed Description

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

      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.

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.

width : real

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