- Qt 6.10
- Qt Graphs
- QML Types
- QtGraphs
- LineSeries
- Qt Graphs | Commercial or GPLv3

# LineSeries QML Type

Presents data in line graphs. More...

Import Statement: | `import QtGraphs`
In C++: | QLineSeries
Inherits: | XYSeries

- List of all members, including inherited members
- LineSeries is part of Qt Graphs QML Types for 2D.

## Properties

- capStyle : Qt::PenCapStyle
- pointDelegate : Component
- width : real

## Signals

- capStyleChanged()
- widthChanged()

## Methods

- dataPointCoordinatesAt(real x, real y)

## Detailed Description

A line graph is used to show information as a series of data points connected by straight lines.

LineSeries uses mostly the same API as ScatterSeries so see ScatterSeries documentation for further usage examples.

See also ScatterSeries.

## 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. Invalid values are automatically set to the default value.

See also Qt::PenCapStyle.

pointDelegate : Component

Marks the point with the given QML component.

     pointDelegate: Image {
         source: "images/happy_box.png"
     }

width : real

The width of the line. By default, the width is 2.0. Widths lower than 0 are invalid and are automatically set to 0.

## Signal Documentation

capStyleChanged()

This signal is emitted when the line series cap style changes.

Note: The corresponding handler is `onCapStyleChanged`.

widthChanged()

This signal is emitted when the line series width changes.

Note: The corresponding handler is `onWidthChanged`.

## Method Documentation

dataPointCoordinatesAt(real x, real y)

Returns x and y rendercoordinates converted into data point coordinates.