IGLinearGaugeView Class Reference

Inherits from UIView
Declared in IGLinearGaugeView.h

Overview

IGLinearGaugeView is a data visualization control, capable of displaying a linear gauge. It contains a number of visual elements, such as a scale with tickmarks and labels, a needle and a number of ranges. A scale is created by supplying minimumValue and maximumValue and a needle is created by setting value property. The needle can be set to any of the predefined shapes. The linear gauge also supports ranges, which provide visual cues for the scale. Additionally, the gauge has a backing shape. This shape is drawn behind the scale and acts as a background for the gauge.

Configuring the Linear Gauge

  delegate

Sets the interaction delegate for the linear gauge.

@property (nonatomic, assign, nullable) id<IGLinearGaugeViewDelegate> delegate

Declared In

IGLinearGaugeView.h

  font

The font used by the scale labels.

@property (nonatomic, retain, nullable) UIFont *font

Declared In

IGLinearGaugeView.h

  fontBrush

The font brush used by the scale labels.

@property (nonatomic, retain, nullable) IGBrush *fontBrush

Declared In

IGLinearGaugeView.h

  interval

The interval used by the scale.

@property (nonatomic) double interval

Declared In

IGLinearGaugeView.h

  maximumValue

@property (nonatomic, assign) double maximumValue

  minimumValue

@property (nonatomic, assign) double minimumValue

  orientation

The orientation of the scale.

@property (nonatomic, assign) IGLinearScaleOrientation orientation

Declared In

IGLinearGaugeView.h

  theme

An object that defines a set of brushes and fonts that will be used to style the linear gauge.

@property (nonatomic, assign, nullable) id<IGLinearGaugeThemeDefinition> theme

Declared In

IGLinearGaugeView.h

  transitionDuration

The number of seconds over which the linear gauge should be animated.

@property (nonatomic, assign) NSTimeInterval transitionDuration

Declared In

IGLinearGaugeView.h

  value

The value, at which to point the needle of the linear gauge.

@property (nonatomic, assign) double value

Declared In

IGLinearGaugeView.h

Backing

  backingBrush

The brush used to fill the backing of the linear gauge.

@property (nonatomic, retain, nullable) IGBrush *backingBrush

Declared In

IGLinearGaugeView.h

  backingInnerExtent

The inner extent of the linear gauge backing. This applies only when using fitted backing shapes.

@property (nonatomic, assign) double backingInnerExtent

Declared In

IGLinearGaugeView.h

  backingOuterExtent

The outer extent of the linear gauge backing. This applies only when using fitted backing shapes.

@property (nonatomic, assign) double backingOuterExtent

Declared In

IGLinearGaugeView.h

  backingOutline

The brush used for the outline of the backing.

@property (nonatomic, retain, nullable) IGBrush *backingOutline

Declared In

IGLinearGaugeView.h

  backingStrokeThickness

The stroke thickness for the backing outline.

@property (nonatomic, assign) double backingStrokeThickness

Declared In

IGLinearGaugeView.h

Major Tickmarks

  tickBrush

The brush of major tickmarks. In order to change the brush of the minor tickmarks, use the minorTickBrush property.

@property (nonatomic, retain, nullable) IGBrush *tickBrush

Declared In

IGLinearGaugeView.h

  tickEndExtent

The end position of major tickmarks measured from the side of the linear gauge containing the maximumValue.

@property (nonatomic, assign) double tickEndExtent

Discussion

The value of this property should be between 0 and 1 and affects major tickmarks only. To change the extent of minor tickmarks, use minorTickEndExtent.

Declared In

IGLinearGaugeView.h

  ticksPostInitial

A value to start adding tickmarks, added to the scale’s minimumValue.

@property (nonatomic) double ticksPostInitial

Declared In

IGLinearGaugeView.h

  ticksPreTerminal

A value to stop adding tickmarks, subtracted from the scale’s maximumValue.

@property (nonatomic) double ticksPreTerminal

Declared In

IGLinearGaugeView.h

  tickStartExtent

The start position of major tickmarks measured from the side of the linear gauge containing the minimumValue.

@property (nonatomic, assign) double tickStartExtent

Discussion

The value of this property should be between 0 and 1 and affects major tickmarks only. To change the extent of minor tickmarks, use minorTickStartExtent.

Declared In

IGLinearGaugeView.h

  tickStrokeThickness

The stroke thickness of the major tickmarks.

@property (nonatomic, assign) double tickStrokeThickness

Declared In

IGLinearGaugeView.h

Minor Tickmarks

  minorTickEndExtent

The position at which to stop rendering the minor tickmarks as a value from 0 to 1, measured from the front/bottom of the linear gauge.

@property (nonatomic, assign) double minorTickEndExtent

Discussion

Values further greater than 1 can be used to make this extend further than the normal size of the linear gauge.

Declared In

IGLinearGaugeView.h

  minorTickStartExtent

The position at which to start rendering the minor tickmarks as a value from 0 to 1, measured from the front/bottom of the linear gauge.

@property (nonatomic, assign) double minorTickStartExtent

Discussion

Values greater than 1 can be used to make this extend further than the normal radius of the linear gauge.

Declared In

IGLinearGaugeView.h

  minorTickStrokeThickness

The thickness of minor tickmarks.

@property (nonatomic, assign) double minorTickStrokeThickness

Declared In

IGLinearGaugeView.h

  minorTickBrush

The brush used for the minor tickmarks.

@property (nonatomic, retain, nullable) IGBrush *minorTickBrush

Declared In

IGLinearGaugeView.h

  minorTickCount

The number of tickmarks to place between two major tickmarks.

@property (nonatomic, assign) double minorTickCount

Declared In

IGLinearGaugeView.h

Needle

  needleBrush

The brush of the linear gauge needle.

@property (nonatomic, retain, nullable) IGBrush *needleBrush

Declared In

IGLinearGaugeView.h

  needleInnerBaseWidth

The width of the needle’s inner base.

@property (nonatomic) double needleInnerBaseWidth

Declared In

IGLinearGaugeView.h

  needleInnerExtent

The position at which to start rendering the needle geometry as a value from 0 to 1, measured from the front/bottom of the linear gauge.

@property (nonatomic, assign) double needleInnerExtent

Discussion

Values further greater than 1 can be used to make this extend further than the normal size of the linear gauge.

Declared In

IGLinearGaugeView.h

  needleInnerPointExtent

The extent of the needle’s inner point.

@property (nonatomic) double needleInnerPointExtent

Declared In

IGLinearGaugeView.h

  needleInnerPointWidth

The width of the needle’s inner point.

@property (nonatomic) double needleInnerPointWidth

Declared In

IGLinearGaugeView.h

  needleOuterBaseWidth

The width of the needle’s outer base.

@property (nonatomic) double needleOuterBaseWidth

Declared In

IGLinearGaugeView.h

  needleOuterExtent

The position at which to stop rendering the needle geometry as a value from 0 to 1, measured from the front/bottom of the linear gauge.

@property (nonatomic, assign) double needleOuterExtent

Discussion

Values further greater than 1 can be used to make this extend further than the normal size of the linear gauge.

Declared In

IGLinearGaugeView.h

  needleOuterPointExtent

The extent of the needle’s outer point.

@property (nonatomic) double needleOuterPointExtent

Declared In

IGLinearGaugeView.h

  needleOuterPointWidth

The width of the needle’s outer point.

@property (nonatomic) double needleOuterPointWidth

Declared In

IGLinearGaugeView.h

  needleOutline

The brush used by the outline of the needle.

@property (nonatomic, retain, nullable) IGBrush *needleOutline

Declared In

IGLinearGaugeView.h

  needleShape

The shape to use when rendering the needle from a number of options.

@property (nonatomic, assign) IGLinearGraphNeedleShape needleShape

Declared In

IGLinearGaugeView.h

  needleStrokeThickness

The stroke thickness of the needle’s outline.

@property (nonatomic, assign) double needleStrokeThickness

Declared In

IGLinearGaugeView.h

Scale

  isScaleInverted

A value indicating whether the scale is inverted.

@property (nonatomic, assign) BOOL isScaleInverted

Discussion

When the scale is inverted the direction in which the scale values increase is right to left.

Declared In

IGLinearGaugeView.h

  scaleBrush

The brush used to fill the background of the scale.

@property (nonatomic, retain, nullable) IGBrush *scaleBrush

Declared In

IGLinearGaugeView.h

  scaleEndExtent

The position at which to stop rendering the scale as a value from 0 to 1, measured from the front/bottom of the linear gauge.

@property (nonatomic, assign) double scaleEndExtent

Discussion

Values further greater than 1 can be used to make this extend further than the normal size of the linear gauge.

Declared In

IGLinearGaugeView.h

  scaleInnerExtent

The position at which to start rendering the ranges as a value from 0 to 1, measured from the front/bottom of the control.

@property (nonatomic, assign) double scaleInnerExtent

Discussion

Values further greater than 1 can be used to make this extend further than the normal size of the linear gauge.

Declared In

IGLinearGaugeView.h

  scaleOuterExtent

The position at which to stop rendering the scale as a value from 0 to 1, measured from the front/bottom of the linear gauge.

@property (nonatomic, assign) double scaleOuterExtent

Discussion

Values further greater than 1 can be used to make this extend further than the normal size of the linear gauge.

Declared In

IGLinearGaugeView.h

  scaleOutline

The brush to use for the outline of the scale. In order for the scaleOutline to be seen, the scaleOuterExtent and scaleInnerExtent must be set.

@property (nonatomic, retain, nullable) IGBrush *scaleOutline

Declared In

IGLinearGaugeView.h

  scaleStartExtent

The position at which to start rendering the scale as a value from 0 to 1, measured from the front/bottom of the linear gauge.

@property (nonatomic, assign) double scaleStartExtent

Discussion

Values further greater than 1 can be used to make this extend further than the normal size of the linear gauge.

Declared In

IGLinearGaugeView.h

  scaleStrokeThickness

The stroke thickness of the scale outline. In order for the scaleStrokeThickness to be seen, the scaleOuterExtent and scaleInnerExtent must be set.

@property (nonatomic, assign) double scaleStrokeThickness

Declared In

IGLinearGaugeView.h

Scale Labels

  labelExtent

The position at which to put the labels as a value from 0 to 1, measured from the bottom of the scale.

@property (nonatomic, assign) double labelExtent

Discussion

Values further greater than 1 can be used to make this extend further than the normal size of the linear gauge.

Declared In

IGLinearGaugeView.h

  labelInterval

The interval to use for rendering labels. This defaults to be the same interval as the tickmarks on the scale.

@property (nonatomic, assign) double labelInterval

Declared In

IGLinearGaugeView.h

  labelsPostInitial

A value to start adding labels, added to the scale’s minimumValue.

@property (nonatomic, assign) double labelsPostInitial

Declared In

IGLinearGaugeView.h

  labelsPreTerminal

A value to stop adding labels, subtracted from the scale’s maximumValue.

@property (nonatomic, assign) double labelsPreTerminal

Declared In

IGLinearGaugeView.h

Ranges

– addRange:

Adds a range to the linear gauge view.

- (void)addRange:(IGLinearGaugeRange *)range

Parameters

range

Range to be added to the linear gauge view.

Declared In

IGLinearGaugeView.h

– clearRanges

Removes all ranges from the gauge view.

- (void)clearRanges

Declared In

IGLinearGaugeView.h

– insertRange:atIndex:

Inserts a range into a linear gauge view at a specified index.

- (void)insertRange:(IGLinearGaugeRange *)range atIndex:(NSUInteger)index

Parameters

range

Range to be inserted into the linear gauge view.

index

Index at which the range will be inserted.

Declared In

IGLinearGaugeView.h

  rangeBrushes

The brush palette used by the linear gauge ranges.

@property (nonatomic, retain, nullable) NSArray<__kindofIGBrush*> *rangeBrushes

Declared In

IGLinearGaugeView.h

  rangeInnerExtent

@property (nonatomic, assign) double rangeInnerExtent

  rangeOuterExtent

@property (nonatomic, assign) double rangeOuterExtent

  rangeOutlines

The brush palette used by the gauge range outlines.

@property (nonatomic, retain, nullable) NSArray<__kindofIGBrush*> *rangeOutlines

Declared In

IGLinearGaugeView.h

  ranges

Returns an array of ranges in the current linear gauge.

@property (nonatomic, readonly) NSArray<__kindofIGLinearGaugeRange*> *ranges

Declared In

IGLinearGaugeView.h

– removeRange:

Removes a specified range from the linear gauge view.

- (void)removeRange:(IGLinearGaugeRange *)range

Parameters

range

Range to be removed from the linear gauge view.

Declared In

IGLinearGaugeView.h

Interacting with the Linear Gauge

– needleAtPoint:

Returns whether the needle exists at a specified point.

- (BOOL)needleAtPoint:(CGPoint)point

Parameters

point

A location inside of the linear gauge.

Declared In

IGLinearGaugeView.h

– valueForPoint:

Given a point on the linear gauge view, a value is returned.

- (double)valueForPoint:(CGPoint)point

Parameters

point

A location inside of the linear gauge.

Discussion

Note: If a point is given where there is an no valid value, a value less than the minimumValue will be returned.

Declared In

IGLinearGaugeView.h

  exportVisualData

Returns a data representation of the visuals of the linear gauge.

@property (NS_NONATOMIC_IOSONLY, readonly, strong) VisualLinearGaugeData *exportVisualData

Discussion

This method is available to provide a way to do validation for testing of the visuals of the linear gauge.

Declared In

IGLinearGaugeView.h