- Qt 6.9
- Qt Graphs
- QML Types
- QtGraphs
- Value3DAxis
- Qt Graphs | Commercial or GPLv3

# Value3DAxis QML Type

Manipulates an axis of a graph. More...

Import Statement: | `import QtGraphs`
In C++: | QValue3DAxis
Inherits: | Abstract3DAxis

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

## Properties

- autoAdjustRange : bool
- formatter : Value3DAxisFormatter
- labelAutoAngle : real
- labelFormat : string
- labelSize : real `(since 6.9)`
- labels : list
- labelsVisible : bool
- max : real
- min : real
- orientation : Abstract3DAxis.AxisOrientation
- reversed : bool
- scaleLabelsByCount : bool `(since 6.9)`
- segmentCount : qsizetype
- subSegmentCount : qsizetype
- title : string
- titleFixed : bool
- titleOffset : real
- titleVisible : bool
- type : Abstract3DAxis.AxisType

## Signals

- autoAdjustRangeChanged(bool autoAdjust)
- formatterChanged(Value3DAxisFormatter formatter)
- labelAutoAngleChanged(real angle)
- labelFormatChanged(string format)
- labelSizeChanged(real size)
- labelVisibilityChanged(bool visible)
- labelsChanged()
- maxChanged(real value)
- minChanged(real value)
- orientationChanged(AxisOrientation orientation)
- rangeChanged(real min, real max)
- reversedChanged(bool enable)
- scaleLabelsByCountChanged(bool adjust)
- segmentCountChanged(qsizetype count)
- subSegmentCountChanged(qsizetype count)
- titleChanged(string newTitle)
- titleFixedChanged(bool fixed)
- titleOffsetChanged(real offset)
- titleVisibilityChanged(bool visible)

## Detailed Description

This type provides an axis that can be given a range of values and segment and subsegment counts to divide the range into.

## Property Documentation

autoAdjustRange : bool

Defines whether the axis will automatically adjust the range so that all data fits in it.

formatter : Value3DAxisFormatter

The axis formatter to be used. Any existing formatter is deleted when a new formatter is set.

labelAutoAngle : real

The maximum angle the labels can autorotate when the camera angle changes. The angle can be between 0 and 90, inclusive. The default value is 0. If the value is 0, axis labels do not automatically rotate. If the value is greater than zero, labels attempt to orient themselves toward the camera, up to the specified angle.

labelFormat : string

The label format to be used for the labels on this axis.

The format string supports the following conversion specifiers, length modifiers, and flags provided by `printf()` in the standard C++ library: d, i, o, x, X, f, F, e, E, g, G, c.

If GraphsItem3D::locale is anything else than `"C"`, the supported specifiers are limited to: d, e, E, f, g, G, and i. Also, only the precision modifier is supported. The rest of the formatting comes from the default Locale of the application.

See also GraphsItem3D::locale.

labelSize : real `[since 6.9]`

The size of the label. The default for this value is `1.0`.

This property was introduced in Qt 6.9.

See also scaleLabelsByCount.

labels : list

The labels for the axis.

Note: Setting this property for Value3DAxis does nothing, as it generates labels automatically.

labelsVisible : bool

Defines whether the axis labels are visible in the primary graph view.

The default value is `true`.

max : real

The maximum value on the axis. When setting this property, the minimum value is adjusted if necessary, so the range remains valid.

min : real

The minimum value on the axis. When setting this property, the maximum value is adjusted if necessary, so the range remains valid.

orientation : Abstract3DAxis.AxisOrientation `[read-only]`

The orientation of the axis.

reversed : bool

If `true`, the axis will be rendered in reverse. That is, the positions of the minimum and maximum values are swapped when the graph is rendered. This property does not affect the actual minimum and maximum values of the axis.

scaleLabelsByCount : bool `[since 6.9]`

Whether the labels will automatically adjust their size based on the total amount of labels.

This property was introduced in Qt 6.9.

See also labelSize.

segmentCount : qsizetype

The number of segments on the axis. This indicates how many labels are drawn. The number of grid lines to be drawn is calculated with the following formula: `segments * subsegments + 1`. The preset default is `5`. The value cannot be below `1`.

subSegmentCount : qsizetype

The number of subsegments inside each segment on the axis. Grid lines are drawn between each subsegment, in addition to each segment. The preset default is `1`. The value cannot be below `1`.

title : string

The title for the axis.

See also titleVisible and titleFixed.

titleFixed : bool

The rotation of axis titles.

If `false`, axis titles in the primary graph view will be rotated towards the camera similarly to the axis labels. If `true`, axis titles are only rotated around their axis but are not otherwise oriented towards the camera. This property does not have any effect if the labelAutoAngle property value is zero. Default value is `true`.

See also labelAutoAngle, title, and titleVisible.

titleOffset : real

The position of the axis title on the axis. The value must be between `-1.0f` and `1.0f`

Default value is `0`.

See also title and titleVisible.

titleVisible : bool

Defines whether the axis title is visible in the primary graph view.

The default value is `false`.

See also title and titleFixed.

type : Abstract3DAxis.AxisType `[read-only]`

The type of the axis.

## Signal Documentation

autoAdjustRangeChanged(bool autoAdjust)

This signal is emitted when the autoAdjustRange property value changes to autoAdjust.

Note: The corresponding handler is `onAutoAdjustRangeChanged`.

formatterChanged(Value3DAxisFormatter formatter)

This signal is emitted when formatter changes to formatter.

Note: The corresponding handler is `onFormatterChanged`.

labelAutoAngleChanged(real angle)

This signal is emitted when the angle of label rotation changes to angle.

Note: The corresponding handler is `onLabelAutoAngleChanged`.

labelFormatChanged(string format)

This signal is emitted when labelFormat changes to format.

Note: The corresponding handler is `onLabelFormatChanged`.

labelSizeChanged(real size)

This signal is emitted when the labelSize property value changes to size.

Note: The corresponding handler is `onLabelSizeChanged`.

labelVisibilityChanged(bool visible)

This signal is emitted when the label visibility changes to visible.

Note: The corresponding handler is `onLabelVisibilityChanged`.

labelsChanged()

This signal is emitted when axis labels change.

Note: The corresponding handler is `onLabelsChanged`.

maxChanged(real value)

This signal is emitted when the maximum value of the axis changes to value.

Note: The corresponding handler is `onMaxChanged`.

minChanged(real value)

This signal is emitted when the minimum value of the axis changes to value.

Note: The corresponding handler is `onMinChanged`.

orientationChanged(AxisOrientation orientation)

This signal is emitted when axis orientation changes to orientation.

Note: The corresponding handler is `onOrientationChanged`.

rangeChanged(real min, real max)

This signal is emitted when the axis range changes. min and max are the min and max of the new range.

Note: The corresponding handler is `onRangeChanged`.

reversedChanged(bool enable)

This signal is emitted when reversed changes to enable.

Note: The corresponding handler is `onReversedChanged`.

scaleLabelsByCountChanged(bool adjust)

This signal is emitted when the scaleLabelsByCount property value changes to adjust.

Note: The corresponding handler is `onScaleLabelsByCountChanged`.

segmentCountChanged(qsizetype count)

This signal is emitted when segmentCount changes to count.

Note: The corresponding handler is `onSegmentCountChanged`.

subSegmentCountChanged(qsizetype count)

This signal is emitted when subSegmentCount changes to count.

Note: The corresponding handler is `onSubSegmentCountChanged`.

titleChanged(string newTitle)

This signal is emitted when title changes to newTitle.

Note: The corresponding handler is `onTitleChanged`.

titleFixedChanged(bool fixed)

This signal is emitted when the titleFixed property value changes to fixed.

Note: The corresponding handler is `onTitleFixedChanged`.

titleOffsetChanged(real offset)

This signal is emitted when the titleOffset property value changes to offset.

Note: The corresponding handler is `onTitleOffsetChanged`.

titleVisibilityChanged(bool visible)

This signal is emitted when the title visibility changes to visible.

Note: The corresponding handler is `onTitleVisibilityChanged`.