- Qt 6.5
- Qt Charts
- QML Types
- AbstractSeries
- Qt Charts | Commercial or GPLv3

# AbstractSeries QML Type

Base type for all Qt Chart series types. More...

Import Statement: | import QtCharts 2.5
Instantiates: | QAbstractSeries
Inherited By: | AbstractBarSeries, AreaSeries, BoxPlotSeries, CandlestickSeries, PieSeries, and XYSeries

- List of all members, including inherited members

## Properties

- name : string
- opacity : real
- type : enumeration
- useOpenGL : bool
- visible : bool

## Detailed Description

This type cannot be instantiated directly. Instead, one of the following derived types should be used to create a series: LineSeries, AreaSeries, BarSeries, StackedBarSeries, PercentBarSeries, HorizontalBarSeries, HorizontalStackedBarSeries, HorizontalPercentBarSeries, PieSeries, ScatterSeries, SplineSeries, BoxPlotSeries, or CandlestickSeries.

## Property Documentation

name : string

The name of the series. It is displayed in the legend for the series and it supports HTML formatting.

opacity : real

The opacity of the series. By default, the opacity is 1.0. The valid values range from 0.0 (transparent) to 1.0 (opaque).

[read-only] type : enumeration

The type of the series.

Constant | Description
--- | ---
`AbstractSeries.SeriesTypeLine` | A line chart.
`AbstractSeries.SeriesTypeArea` | An area chart.
`AbstractSeries.SeriesTypeBar` | A vertical bar chart.
`AbstractSeries.SeriesTypeStackedBar` | A vertical stacked bar chart.
`AbstractSeries.SeriesTypePercentBar` | A vertical percent bar chart.
`AbstractSeries.SeriesTypePie` | A pie chart.
`AbstractSeries.SeriesTypeScatter` | A scatter chart.
`AbstractSeries.SeriesTypeSpline` | A spline chart.
`AbstractSeries.SeriesTypeHorizontalBar` | A horizontal bar chart.
`AbstractSeries.SeriesTypeHorizontalStackedBar` | A horizontal stacked bar chart.
`AbstractSeries.SeriesTypeHorizontalPercentBar` | A horizontal percent bar chart.
`AbstractSeries.SeriesTypeBoxPlot` | A box plot chart.
`AbstractSeries.SeriesTypeCandlestick` | A candlestick chart.

useOpenGL : bool

Specifies whether or not the series is drawn with OpenGL.

Acceleration using OpenGL is supported only for LineSeries and ScatterSeries. A line series used as an edge series for a AreaSeries cannot use OpenGL acceleration. When a chart contains any series that are drawn with OpenGL, an additional transparent child node is created for the ChartView node. The accelerated series are not drawn on the ChartView node, but are instead drawn on the child node.

Performance gained from using OpenGL to accelerate series drawing depends on the underlying hardware, but in most cases it is significant. For example, on a standard desktop computer, enabling OpenGL acceleration for a series typically allows rendering at least hundred times more points without reduction on the frame rate. Chart size also has less effect on the frame rate. The biggest performance sink when rendering ChartView is rendering and uploading the underlying chart texture. If the underlying chart itself is not changing rapidly, significant extra performance is gained from not needing to regenerate the chart texture for each frame.

The OpenGL acceleration of series drawing is meant for use cases that need fast drawing of large numbers of points. It is optimized for efficiency, and therefore the series using it lack support for many features available to non-accelerated series:

- Series animations are not supported for accelerated series.
- Point labels are not supported for accelerated series.
- Pen styles, marker shapes and light markers are ignored for accelerated series. Only solid lines and plain scatter dots are supported. The scatter dots may be circular or rectangular, depending on the underlying graphics hardware and drivers.
- Polar charts do not support accelerated series.
- Mouse events for series are reported asynchronously.
- Enabling chart drop shadow or using transparent chart background color is not recommended when using accelerated series, as that can slow the frame rate down significantly.

The default value is `false`.

visible : bool

Visibility of the series. By default, `true`.