Qt 5.7 | Qt Charts | QML Types | AbstractAxis QML Type

Qt 5.7.1 Reference Documentation

# AbstractAxis QML Type

The AbstractAxis is a base element used for specialized axis elements. More...

Import Statement: | import QtCharts 2.1
Instantiates: | QAbstractAxis
Inherited By: | BarCategoryAxis, CategoryAxis, DateTimeAxis, LogValueAxis, and ValueAxis

- List of all members, including inherited members

## Properties

- alignment : alignment
- color : color
- gridVisible : bool
- labelsAngle : int
- labelsColor : color
- labelsFont : Font
- labelsVisible : bool
- lineVisible : bool
- minorGridVisible : bool
- orientation : Qt.Orientation
- reverse : alignment
- shadesBorderColor : color
- shadesColor : color
- shadesVisible : bool
- titleFont : Font
- titleText : String
- titleVisible : bool
- visible : bool

## Signals

- onBorderColorChanged(QColor color)
- onColorChanged(QColor color)
- onGridVisibleChanged(bool visible)
- onLabelsAngleChanged(int angle)
- onLabelsColorChanged(QColor color)
- onLabelsFontChanged(Font font)
- onLabelsVisibleChanged(bool visible)
- onLineVisibleChanged(bool visible)
- onMinorGridVisibleChanged(bool visible)
- onShadesColorChanged(QColor color)
- onShadesVisibleChanged(bool visible)
- onTitleFontChanged(Font font)
- onTitleTextChanged(String text)
- onTitleVisibleChanged(bool visible)
- onVisibleChanged(bool visible)

## Detailed Description

Each series can be bound to only one horizontal and vertical axis.

Properties and visibility of various axis elements such as axis line, title, labels, grid lines, and shades can be individually controlled.

## Property Documentation

alignment : alignment

The alignment of the axis. Can be Qt.AlignLeft, Qt.AlignRight, Qt.AlignBottom, or Qt.AlignTop.

color : color

The color of the axis and ticks.

gridVisible : bool

The visibility of the grid lines.

labelsAngle : int

The angle of the axis labels in degrees.

labelsColor : color

The color of the axis labels.

labelsFont : Font

The font of the axis labels.

See the Qt documentation for more details of Font.

labelsVisible : bool

Defines if axis labels are visible.

lineVisible : bool

The visibility of the axis line

minorGridVisible : bool

The visibility of the minor grid lines. Applies only to QValueAxis.

orientation : Qt.Orientation

The orientation of the axis. Fixed to either Qt.Horizontal or Qt.Vertical when the axis is set to a series.

reverse : alignment

The reverse property defines if reverse axis is used. By default the value is false.

Reverse axis is supported with line, spline, scatter and area series with cartesian chart. All axes of the same orientation attached to same series must be reversed if one is reversed or the behavior is undefined.

shadesBorderColor : color

The border (pen) color of the axis shades.

shadesColor : color

The fill (brush) color of the axis shades.

shadesVisible : bool

The visibility of the axis shades.

titleFont : Font

The font of the title of the axis.

titleText : String

The title of the axis. Empty by default. Axis titles support html formatting.

titleVisible : bool

The visibility of the axis title. By default the value is true.

visible : bool

The visibility of the axis.

## Signal Documentation

onBorderColorChanged(QColor color)

Emitted if the border color of the axis shades is changed.

onColorChanged(QColor color)

Emitted if the color of the axis is changed.

onGridVisibleChanged(bool visible)

Visibility of the grid lines of the axis has changed to visible.

onLabelsAngleChanged(int angle)

The angle of the axis labels has changed to angle.

onLabelsColorChanged(QColor color)

Emitted if the color of the axis labels is changed.

onLabelsFontChanged(Font font)

The font of the axis labels has changed to font.

onLabelsVisibleChanged(bool visible)

Visibility of the labels of the axis has changed to visible.

onLineVisibleChanged(bool visible)

Visibility of the axis line has changed to visible.

onMinorGridVisibleChanged(bool visible)

Visibility of the minor grid lines of the axis has changed to visible.

onShadesColorChanged(QColor color)

Emitted if the color of the axis shades is changed.

onShadesVisibleChanged(bool visible)

Emitted if the visibility of the axis shades is changed to visible.

onTitleFontChanged(Font font)

The font of the axis title has changed to font.

onTitleTextChanged(String text)

The text of the axis title has changed to text.

onTitleVisibleChanged(bool visible)

Visibility of the title text of the axis has changed to visible.

onVisibleChanged(bool visible)

Visibility of the axis has changed to visible.