Obsolete Members for QChart | Qt Charts 5.13.1

Qt 5.13 | Qt Charts | C++ Classes | QChart

Qt Charts | Commercial or GPLv3

# Obsolete Members for QChart

The following members of class QChart are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

## Public Functions

`(obsolete)` QAbstractAxis * | axisX(QAbstractSeries *series = nullptr) const
`(obsolete)` QAbstractAxis * | axisY(QAbstractSeries *series = nullptr) const
`(obsolete)` void | setAxisX(QAbstractAxis *axis, QAbstractSeries *series = nullptr)
`(obsolete)` void | setAxisY(QAbstractAxis *axis, QAbstractSeries *series = nullptr)

## Member Function Documentation

### QAbstractAxis *QChart::axisX(QAbstractSeries *series = nullptr) const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use axes() instead.

Returns a pointer to the horizontal axis attached to the specified series. If no series is specified, the first horizontal axis added to the chart is returned.

See also setAxisX(), addAxis(), and QAbstractSeries::attachAxis().

### QAbstractAxis *QChart::axisY(QAbstractSeries *series = nullptr) const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use axes() instead.

Returns a pointer to the vertical axis attached to the specified series. If no series is specified, the first vertical axis added to the chart is returned.

See also setAxisY(), addAxis(), and QAbstractSeries::attachAxis().

### void QChart::setAxisX(QAbstractAxis *axis, QAbstractSeries *series = nullptr)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use addAxis() instead.

Adds the axis axis to the chart and attaches it to the series series as a bottom-aligned horizontal axis. The chart takes ownership of both the axis and the series. Any horizontal axes previously attached to the series are deleted.

See also axisX(), axisY(), setAxisY(), createDefaultAxes(), and QAbstractSeries::attachAxis().

### void QChart::setAxisY(QAbstractAxis *axis, QAbstractSeries *series = nullptr)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use addAxis() instead.

Adds the axis axis to the chart and attaches it to the series series as a left-aligned vertical axis. The chart takes ownership of both the axis and the series. Any vertical axes previously attached to the series are deleted.

See also axisX(), axisY(), setAxisX(), createDefaultAxes(), and QAbstractSeries::attachAxis().