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

QColorAxis Class

The QColorAxis class displays a color scale as one of the chart's axes.

This class was introduced in Qt 6.2.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QColorAxis Class

Detailed Description

A color axis can be set up to show a color scale based on the passed gradient. The scale has tick marks with labels based on data passed in QXYSeries::colorby method.

Property Documentation

 

autoRange : bool

This property holds the property indicating if the range should be set from the list of values passed in QXYSeries::colorBy method or rather taken from the axis itself.

The default value is true.

Access functions:

  • bool autoRange() const

  • void setAutoRange(bool autoRange)

Notifier signal:

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.

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.

Access functions:

  • qreal min() const

  • void setMin(qreal min)

Notifier signal:

size : qreal

This property holds the size of the color scale.

Depending on the alignment the value indicates either width or height.

Access functions:

  • qreal size() const

  • void setSize(const qreal size)

Notifier signal:

  • void sizeChanged(const qreal size)

tickCount : int

This property holds the number of tick marks on the axis. This indicates how many grid lines are drawn on the chart if QColorAxis::gridVisible is equal to true. The default value is 5, and the number cannot be less than 2.

Grid lines are intentionally invisible by default in QColorAxis as this type of axis does not represent geometric values.

Access functions:

  • int tickCount() const

  • void setTickCount(int count)

Notifier signal:

Member Function Documentation

 

[virtual] QColorAxis::~QColorAxis()

Destroys the object.

void QColorAxis::autoRangeChanged(bool autoRange)

This signal is emitted when the auto range mode, specified by autoRange, changes.

Notifier signal for property autoRange.

QLinearGradient QColorAxis::gradient() const

Returns the gradient currently used on the color scale.

If the axis is attached to a series, the gradient is also used by the QXYSeries::colorBy method.

See Also

See also setGradient

void QColorAxis::maxChanged(qreal max)

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

Notifier signal for property max.

void QColorAxis::minChanged(qreal min)

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

Notifier signal for property min.

void QColorAxis::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 QColorAxis::setGradient(const QLinearGradient &gradient)

Sets the gradient on the color scale to gradient.

If the axis is attached to a series, the gradient is also used by the QXYSeries::colorBy method.

See Also

See also gradient

void QColorAxis::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.

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