Rogue Wave Views
Charts Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions | Friends
IlvTimeScaleStepsUpdater Class Reference

Class for computing the time-based graduations of a scale. More...

#include <ilviews/charts/date.h>

Inheritance diagram for IlvTimeScaleStepsUpdater:
IlvScaleStepsUpdater IlvNamedProperty IlvValueInterface

Public Member Functions

 IlvTimeScaleStepsUpdater (IlvSingleScaleDisplayer *scale)
 Constructs a new IlvTimeScaleStepsUpdater for the given scale.
 
virtual char * computeStepLabel (IlDouble value) const
 
virtual char * computeStepLabel (IlDouble value, IlTimeUnit *unit) const
 
IlDouble getFirstStepData () const
 Returns the data value associated with the first major step. More...
 
IlDouble getLastStepData () const
 Returns the data value associated with the last major step. More...
 
IlDouble getStepDataMax () const
 Returns the data value associated with the last step of the scale. More...
 
IlDouble getStepDataMin () const
 Returns the data value associated with the first step of the scale. More...
 
IlvDim getStepsSpacing () const
 Returns the steps spacing. More...
 
virtual void getStepSubStepValues (const IlvProjectorArea &area, IlUInt &stepsCount, IlDouble *&stepValues, IlUInt &subStepsCount, IlDouble *&subStepValues) const
 Computes and returns the step and substep values for the associated scale. More...
 
const IlTimeUnitgetTimeUnit () const
 Returns the current time unit.
 
virtual IlBoolean hasSubStep () const
 Returns false.
 
virtual IlDouble incrementStep (IlDouble v) const
 Returns the scale step incremented by the argument. More...
 
virtual IlDouble incrementSubStep (IlDouble v) const
 Returns the scale substep incremented by the argument. More...
 
IlBoolean isAutoUnit () const
 Returns whether the scale updater tries to compute the best time unit for the current data set.
 
IlBoolean isFirstStepDataDefined () const
 Indicates whether a data value is associated with the first major step. More...
 
IlBoolean isLastStepDataDefined () const
 Indicates whether a data value is associated with the last major step. More...
 
IlBoolean isUsingTransformer () const
 Returns whether the scale updater is using a transformer.
 
virtual IlDouble nextStep (IlDouble v) const
 Returns the scale step immediately above (or equal to) the specified value. More...
 
virtual IlDouble nextSubStep (IlDouble v) const
 Returns the scale substep immediately above (or equal to) the specified value. More...
 
virtual IlDouble previousStep (IlDouble v) const
 Returns the scale step value immediately before the specified value. More...
 
virtual IlDouble previousSubStep (IlDouble v) const
 Returns the scale substep value immediately before the specified value. More...
 
void setAutoUnit (IlBoolean b)
 Sets whether the scale updater should try to compute the best time unit for the current data set.
 
void setFirstStepData (IlDouble value)
 Sets the data value associated with the first major step. More...
 
void setLastStepData (IlDouble value)
 Sets the data value associated with the last major step. More...
 
void setStepsSpacing (IlvDim stepsSpacing)
 Sets the steps spacing. More...
 
void setTimeUnit (IlTimeUnit *unit)
 Sets the time unit. More...
 
void useTransformer (IlBoolean b)
 Sets whether the scale updater is using a transformer.
 
- Public Member Functions inherited from IlvScaleStepsUpdater
virtual IlBoolean checkRange (IlvCoordInterval &range) const
 Checks whether an interval is valid with respect to the step definition. More...
 
IlvCoordinateInfogetCoordinateInfo () const
 Deprecated More...
 
IlvSingleScaleDisplayergetScale () const
 Returns the scale associated with the current scale steps updater. More...
 

Friends

class IlvSingleScaleDisplayer
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvScaleStepsUpdater
static IlvScaleStepsUpdaterGet (const IlvSingleScaleDisplayer *scale)
 Returns the scale steps updater set on a given scale. More...
 
static IlvScaleStepsUpdaterRemove (IlvSingleScaleDisplayer *scale)
 Removes the scale steps updater set on a given scale. More...
 
static IlvScaleStepsUpdaterSet (IlvSingleScaleDisplayer *scale, IlvScaleStepsUpdater *updater)
 Sets a scale steps updater on a given scale. More...
 
- Protected Member Functions inherited from IlvScaleStepsUpdater
 IlvScaleStepsUpdater (IlvSingleScaleDisplayer *scale)
 Constructor. More...
 

Detailed Description

Class for computing the time-based graduations of a scale.

Library: ilvcharts

IlvTimeScaleStepsUpdater is a class that allows you to compute the steps for a single scale based on a time unit (seconds, minutes, days, weeks, and so on).

See also
IlvNamedProperty, IlvSingleScaleDisplayer.

Member Function Documentation

virtual char* IlvTimeScaleStepsUpdater::computeStepLabel ( IlDouble  value) const
virtual
Returns
The label for the value. This should be deleted by the caller.

Reimplemented from IlvScaleStepsUpdater.

virtual char* IlvTimeScaleStepsUpdater::computeStepLabel ( IlDouble  value,
IlTimeUnit unit 
) const
virtual
Returns
The label for the value and the specified time unit. This should be deleted by the caller.
IlDouble IlvTimeScaleStepsUpdater::getFirstStepData ( ) const

Returns the data value associated with the first major step.

Returns
The value associated with the first major step.
See also
IlvConstantScaleStepsUpdater::setFirstStepData.
IlDouble IlvTimeScaleStepsUpdater::getLastStepData ( ) const

Returns the data value associated with the last major step.

Returns
The value associated with the last major step.
See also
IlvConstantScaleStepsUpdater::setLastStepData.
IlDouble IlvTimeScaleStepsUpdater::getStepDataMax ( ) const

Returns the data value associated with the last step of the scale.

Returns
The data value associated with the last step of the scale.
IlDouble IlvTimeScaleStepsUpdater::getStepDataMin ( ) const

Returns the data value associated with the first step of the scale.

Returns
The data value associated with the first step of the scale.
IlvDim IlvTimeScaleStepsUpdater::getStepsSpacing ( ) const

Returns the steps spacing.

Returns
The minimum spacing between two steps.
virtual void IlvTimeScaleStepsUpdater::getStepSubStepValues ( const IlvProjectorArea &  area,
IlUInt stepsCount,
IlDouble *&  stepValues,
IlUInt subStepsCount,
IlDouble *&  subStepValues 
) const
virtual

Computes and returns the step and substep values for the associated scale.

Parameters
areaThe data area definition. This data area definition can be retrieved with the IlvChartGraphic::getProjectorArea method.
stepsCountReturns the number of major steps.
stepValuesReturns the values associated with the major steps.
subStepsCountReturns the number of minor steps.
subStepValuesReturns the values associated with the minor steps.

Implements IlvScaleStepsUpdater.

virtual IlDouble IlvTimeScaleStepsUpdater::incrementStep ( IlDouble  v) const
virtual

Returns the scale step incremented by the argument.

Parameters
vargument value
virtual IlDouble IlvTimeScaleStepsUpdater::incrementSubStep ( IlDouble  v) const
virtual

Returns the scale substep incremented by the argument.

Parameters
vargument value
IlBoolean IlvTimeScaleStepsUpdater::isFirstStepDataDefined ( ) const

Indicates whether a data value is associated with the first major step.

Returns
IlTrue if an associated value exists and IlFalse otherwise.
See also
IlvConstantScaleStepsUpdater::setFirstStepData.
IlBoolean IlvTimeScaleStepsUpdater::isLastStepDataDefined ( ) const

Indicates whether a data value is associated with the last major step.

Returns
IlTrue if an associated value exists, IlFalse otherwise.
See also
IlvConstantScaleStepsUpdater::setLastStepData.
virtual IlDouble IlvTimeScaleStepsUpdater::nextStep ( IlDouble  v) const
virtual

Returns the scale step immediately above (or equal to) the specified value.

Parameters
vargument value
virtual IlDouble IlvTimeScaleStepsUpdater::nextSubStep ( IlDouble  v) const
virtual

Returns the scale substep immediately above (or equal to) the specified value.

Parameters
vargument value
virtual IlDouble IlvTimeScaleStepsUpdater::previousStep ( IlDouble  v) const
virtual

Returns the scale step value immediately before the specified value.

Parameters
vargument value
virtual IlDouble IlvTimeScaleStepsUpdater::previousSubStep ( IlDouble  v) const
virtual

Returns the scale substep value immediately before the specified value.

Parameters
vargument value
void IlvTimeScaleStepsUpdater::setFirstStepData ( IlDouble  value)

Sets the data value associated with the first major step.

This method lets you define which value should be associated with the first major step of the scale. If this data is not defined, the first step will be drawn for the minimum value of the coordinate range represented by the associated scale.

Parameters
valueThe value for the first major step.
void IlvTimeScaleStepsUpdater::setLastStepData ( IlDouble  value)

Sets the data value associated with the last major step.

This method lets you define which value should be associated with the last major step of the scale. If this data is not defined, the last step will be drawn for the maximum value of the coordinate range represented by the associated scale.

Parameters
valueThe value for the last major step.
void IlvTimeScaleStepsUpdater::setStepsSpacing ( IlvDim  stepsSpacing)

Sets the steps spacing.

Parameters
stepsSpacingThe new minimum spacing between two steps.
void IlvTimeScaleStepsUpdater::setTimeUnit ( IlTimeUnit unit)

Sets the time unit.

Parameters
unitThe new time unit. The object does NOT take ownership or the new time unit.

© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.