IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QLogValueAxis Class

The QLogValueAxis class adds a logarithmic scale to a chart's axis.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QLogValueAxis Class

  • Header: QLogValueAxis

  • Inherited By:

  • Instantiated By: qml-qtcharts-logvalueaxis.xml

  • Inherits: QAbstractAxis

Detailed Description

A logarithmic scale is a nonlinear scale that is based on orders of magnitude, so that each tick mark on the axis is the previous tick mark multiplied by a value.

If QLogValueAxis is attached to a series with one or more points with negative or zero values on the associated dimension, the series will not be plotted at all. This is particularly relevant when XYModelMappers are used, since empty cells in models typically contain zero values.

Property Documentation

 

base : qreal

This property holds the base of the logarithm.

The value has to be greater than 0 and cannot equal 1.

Access functions:

  • qreal base() const

  • void setBase(qreal base)

Notifier signal:

labelFormat : QString

This property holds the label format of the 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 QChart::localizeNumbers is true, 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 QLocale of the application.

Access functions:

  • labelFormat() const

  • void setLabelFormat(const &format)

Notifier signal:

See Also

See also QString::asprintf()

max : qreal

This property holds the maximum value on the axis.

When setting this property, the minimum value is adjusted if necessary, to ensure that the range remains valid. The value has to be greater than 0.

Access functions:

  • qreal max() const

  • void setMax(qreal max)

Notifier signal:

min : qreal

This property holds the minimum value on the axis.

When setting this property, the maximum value is adjusted if necessary, to ensure that the range remains valid. The value has to be greater than 0.

Access functions:

  • qreal min() const

  • void setMin(qreal min)

Notifier signal:

minorTickCount : int

This property holds the number of minor tick marks on the axis. This indicates how many grid lines are drawn between major ticks on the chart. Labels are not drawn for minor ticks. The default value is 0. Set the value to -1 and the number of grid lines between major ticks will be calculated automatically.

Access functions:

  • int minorTickCount() const

  • void setMinorTickCount(int minorTickCount)

Notifier signal:

[read-only] tickCount : const int

This property holds the number of tick marks on the axis. This indicates how many grid lines are drawn on the chart. This value is read-only.

Access functions:

  • int tickCount() const

Notifier signal:

Member Function Documentation

 

[explicit] QLogValueAxis::QLogValueAxis(QObject *parent = nullptr)

Constructs an axis object that is a child of parent.

[virtual] QLogValueAxis::~QLogValueAxis()

Destroys the object.

void QLogValueAxis::baseChanged(qreal base)

This signal is emitted when the base of the logarithm of the axis changes.

Notifier signal for property base.

void QLogValueAxis::labelFormatChanged(const QString &format)

This signal is emitted when the format of axis labels changes.

Notifier signal for property labelFormat.

void QLogValueAxis::maxChanged(qreal max)

This signal is emitted when the maximum value of the axis, specified by max, changes.

Notifier signal for property max.

void QLogValueAxis::minChanged(qreal min)

This signal is emitted when the minimum value of the axis, specified by min, changes.

Notifier signal for property min.

void QLogValueAxis::minorTickCountChanged(int minorTickCount)

This signal is emitted when the number of minor tick marks on the axis, specified by minorTickCount, changes.

Notifier signal for property minorTickCount.

void QLogValueAxis::rangeChanged(qreal min, qreal max)

This signal is emitted when the minimum or maximum value of the axis, specified by min and max, changes.

void QLogValueAxis::setRange(qreal min, qreal max)

Sets the range from min to max on the axis. If min is greater than max, this function returns without making any changes.

void QLogValueAxis::tickCountChanged(int tickCount)

This signal is emitted when the number of tick marks on the axis, specified by tickCount, changes.

Notifier signal for property tickCount.

[override virtual] QAbstractAxis::AxisType QLogValueAxis::type() const

Reimplements: QAbstractAxis::type() const.

Returns the type of the axis.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+