Inherits from UIView
Declared in IGGaugeView.h

Overview

IGGaugeView is a data visualization control, capable of displaying a gauge. It containis 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 gauge also supports ranges, which provide visual cues for the scale.

The gauge has a backing shape. This shape is drawn behind the scale and acts as a background for the gauge. The backing can be circular, which turns the shape into a full circle, or it can be fitted, which makes it sweep the scale.

The gauge needle takes on one of the several predefined shapes. The needle can have a pivot shape, which is placed in the center of the gauge. The pivot shape also takes one of the predefined shapes. Pivot shapes that include an overlay or an underlay can have a separate pivot brush applied to the shape.

Tasks

Other Methods

Configuring the gauge view

Interacting with the Gauge

Properties

backingBrush

Determines the brush used to fill the backing of the gauge.

@property (nonatomic, retain) IGBrush *backingBrush

Declared In

IGGaugeView.h

backingCornerRadius

Determines the corner rounding radius to use for the fitted scale backings. If the gauge uses a fitted backing shape, this property can be used to provide rounded corners for the backing.

@property (nonatomic) CGFloat backingCornerRadius

Declared In

IGGaugeView.h

backingInnerExtent

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

@property (nonatomic) CGFloat backingInnerExtent

Declared In

IGGaugeView.h

backingOuterExtent

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

@property (nonatomic) CGFloat backingOuterExtent

Declared In

IGGaugeView.h

backingOutline

Determines the brush used for the outline of the backing.

@property (nonatomic, retain) IGBrush *backingOutline

Declared In

IGGaugeView.h

backingOversweep

Determines the over or undersweep degrees to apply to the fitted backing. This property can be used to add extra space and extend the backing shape past the start and end of the scale.

@property (nonatomic) CGFloat backingOversweep

Declared In

IGGaugeView.h

backingShape

This property can be used to set the shape of the backing of the gauge to a predefined shape. The backing shape can either be circular or fitted. A fitted shape creates a filled arc segment that encompasses the scale.

@property (nonatomic) IGGaugeBackingShape backingShape

Declared In

IGGaugeView.h

backingStrokeThickness

Determines the stroke thickness for the backing outline.

@property (nonatomic) CGFloat backingStrokeThickness

Declared In

IGGaugeView.h

centerX

Determines the x position of the center of the gauge with the value ranging from 0 to 1.

@property (nonatomic) CGFloat centerX

Declared In

IGGaugeView.h

centerY

Determines the y position of the center of the gauge with the value ranging from 0 to 1.

@property (nonatomic) CGFloat centerY

Declared In

IGGaugeView.h

delegate

Sets the interaction delegate for the linear gauge.

@property (nonatomic, assign) id<IGGaugeViewDelegate> delegate

Declared In

IGGaugeView.h

duplicateLabelOmissionStrategy

Determines the behavior of overlapping first and last labels on the scale. If the scale wraps around in such a way that the first and the last labels align, this property can determine which of the two labels should be displayed. OmitFirst will hide the first label, OmitLast will hide the last label. OmitBoth will hide both labels and OmitNeither will show both labels and will let them collide.

@property (nonatomic) IGGaugeDuplicateLabelOmissionStrategy duplicateLabelOmissionStrategy

Declared In

IGGaugeView.h

exportVisualData

Returns a data representation of the visuals of the gauge.

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

Discussion

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

Declared In

IGGaugeView.h

font

Determines the font used by the gauge scale labels.

@property (nonatomic, retain) UIFont *font

Declared In

IGGaugeView.h

fontBrush

Determines the font brush used by the gauge scale labels.

@property (nonatomic, retain) IGBrush *fontBrush

Declared In

IGGaugeView.h

interval

Determines the interval used by the scale.

@property (nonatomic) CGFloat interval

Declared In

IGGaugeView.h

labelExtent

Determines the label position as a value between 0 and 1 from the center of the gauge. Setting labelExtent to 0 will place all the labels at the center of the gauge, while setting it to 1 will place them at radius.

@property (nonatomic) CGFloat labelExtent

Declared In

IGGaugeView.h

labelInterval

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

@property (nonatomic) CGFloat labelInterval

Declared In

IGGaugeView.h

maximumValue

Determines the maximum value of the scale.

@property (nonatomic) CGFloat maximumValue

Declared In

IGGaugeView.h

minimumValue

Determines the minimum value of the scale.

@property (nonatomic) CGFloat minimumValue

Declared In

IGGaugeView.h

minorTickBrush

Determines the brush used for the minor tickmarks.

@property (nonatomic, retain) IGBrush *minorTickBrush

Declared In

IGGaugeView.h

minorTickCount

Determines the number of tickmarks to place between two major tickmarks.

@property (nonatomic) CGFloat minorTickCount

Declared In

IGGaugeView.h

minorTickEndExtent

Determines the position at which to stop rendering the minor tickmarks as a value from 0 to 1, measured from the center of the gauge. Values greater than 1 can be used to make this extend further than the normal radius of the gauge.

@property (nonatomic) CGFloat minorTickEndExtent

Declared In

IGGaugeView.h

minorTickStartExtent

Determines the position at which to start rendering the minor tickmarks as a value from 0 to 1, measured from the center of the gauge. Values greater than 1 can be used to make this extend further than the normal radius of the gauge.

@property (nonatomic) CGFloat minorTickStartExtent

Declared In

IGGaugeView.h

minorTickStrokeThickness

Determines the thickness of minor tickmarks.

@property (nonatomic) CGFloat minorTickStrokeThickness

Declared In

IGGaugeView.h

needleBaseFeatureExtent

Determines the extent of the feature that is closest to the base (e.g. a bulb). The feature can only be placed between the tail of the needle and the pivot, so this property should have a value that is less than 0. The feature will be hidden if it intersects the needle’s pivot shape. Only needle shapes that have a bulb respect this property.

@property (nonatomic) CGFloat needleBaseFeatureExtent

Declared In

IGGaugeView.h

needleBaseFeatureWidthRatio

Determines the width of the needle at its feature that is closest to the base (e.g. a bulb). The value of this property should be between 0 and 1. Only needle shapes that have a bulb respect this property.

@property (nonatomic) CGFloat needleBaseFeatureWidthRatio

Declared In

IGGaugeView.h

needleBrush

Determines the brush of the gauge needle.

@property (nonatomic, retain) IGBrush *needleBrush

Declared In

IGGaugeView.h

needleEndExtent

Determines the end extent of the needle, measured from the center of the gauge. The value of this property should be between -1 and 1.

@property (nonatomic) CGFloat needleEndExtent

Declared In

IGGaugeView.h

needleEndWidthRatio

Determines the width of the needle at its point. The value of this property should be between 0 and 1.

@property (nonatomic) CGFloat needleEndWidthRatio

Declared In

IGGaugeView.h

needleOutline

Determines the brush used by the outline of the needle.

@property (nonatomic, retain) IGBrush *needleOutline

Declared In

IGGaugeView.h

needlePivotBrush

Determines the fill brush for the needle pivot shape. This pivot brush only applies to the pivot shapes that draw an overlay or an underlay. Otherwise, this setting has no effect on the pivot shape.

@property (nonatomic, retain) IGBrush *needlePivotBrush

Declared In

IGGaugeView.h

needlePivotInnerWidthRatio

Determines the width of the inner cutout section of the needle pivot shape. The value of this property should be between 0 and 1. This will only take effect if the needle has a pivot set that has a cutout section.

@property (nonatomic) CGFloat needlePivotInnerWidthRatio

Declared In

IGGaugeView.h

needlePivotOutline

Determines the brush used by the outlines of the needle pivot shape. This pivot brush only applies to the pivot shapes that draw an overlay or an underlay. Otherwise, this setting has no effect on the pivot shape.

@property (nonatomic, retain) IGBrush *needlePivotOutline

Declared In

IGGaugeView.h

needlePivotShape

Determines the pivot shape to use for the needle.

@property (nonatomic) IGGaugePivotShape needlePivotShape

Declared In

IGGaugeView.h

needlePivotStrokeThickness

Determines the stroke thickness of the needle pivot’s outline.

@property (nonatomic) CGFloat needlePivotStrokeThickness

Declared In

IGGaugeView.h

needlePivotWidthRatio

Determines the width of the needle pivot shape. The value of this property should be between 0 and 1. Only takes effect when a pivot is set on the needle.

@property (nonatomic) CGFloat needlePivotWidthRatio

Declared In

IGGaugeView.h

needlePointFeatureExtent

Determines the extent of the feature closest to the point (e.g. the tapering point of a needle). The value of this property should be between -1 and 1. Only some needle shapes respect this property.

@property (nonatomic) CGFloat needlePointFeatureExtent

Declared In

IGGaugeView.h

needlePointFeatureWidthRatio

Determines the width of the needle at its feature closest to the point (e.g. the tapering point of a needle). The value of this property should be between 0 and 1. Only some needle shapes respect this property.

@property (nonatomic) CGFloat needlePointFeatureWidthRatio

Declared In

IGGaugeView.h

needleShape

This property can be used to set one of the predefined shapes for the needle.

@property (nonatomic) IGGaugeNeedleShape needleShape

Declared In

IGGaugeView.h

needleStartExtent

Determines the start extent of the needle, measured from the center of the gauge. The value of this property should be between -1 and 1.

@property (nonatomic) CGFloat needleStartExtent

Declared In

IGGaugeView.h

needleStartWidthRatio

Determines the width of the needle at its point. The value of this property should be between 0 and 1.

@property (nonatomic) CGFloat needleStartWidthRatio

Declared In

IGGaugeView.h

needleStrokeThickness

Detemines the stroke thickness of the needle’s outline.

@property (nonatomic) CGFloat needleStrokeThickness

Declared In

IGGaugeView.h

radiusMultiplier

Determines the multiplying factor to apply to the normal radius of the gauge. The normal radius of the gauge is defined by the minimum of the width and height of the control divided by 2.0.

@property (nonatomic) CGFloat radiusMultiplier

Declared In

IGGaugeView.h

rangeBrushes

Determines the brush palette used by the gauge ranges.

@property (nonatomic, retain) NSArray *rangeBrushes

Declared In

IGGaugeView.h

rangeOutlines

Determines the brush palette used by the gauge range outlines.

@property (nonatomic, retain) NSArray *rangeOutlines

Declared In

IGGaugeView.h

ranges

Returns an array of ranges in the current gauge.

@property (nonatomic, readonly) NSArray *ranges

Declared In

IGGaugeView.h

resolvedBackgroundColor

Returns the resolved background color of the gauge.

@property (nonatomic, readonly) UIColor *resolvedBackgroundColor

Declared In

IGGaugeView.h

resolvedBackingBrush

Returns the resolved backing brush. (read-only)

@property (nonatomic, readonly) IGBrush *resolvedBackingBrush

Declared In

IGGaugeView.h

resolvedBackingOutline

Returns the resolved backing outline. (read-only)

@property (nonatomic, readonly) IGBrush *resolvedBackingOutline

Declared In

IGGaugeView.h

resolvedFont

Returns the resolved label font. (read-only)

@property (nonatomic, readonly) UIFont *resolvedFont

Declared In

IGGaugeView.h

resolvedFontBrush

Returns the resolved font brush. (read-only)

@property (nonatomic, readonly) IGBrush *resolvedFontBrush

Declared In

IGGaugeView.h

resolvedMinorTickBrush

Returns the resolved minor tickmark brush. (read-only)

@property (nonatomic, readonly) IGBrush *resolvedMinorTickBrush

Declared In

IGGaugeView.h

resolvedNeedleBrush

Returns the resolved needle brush. (read-only)

@property (nonatomic, readonly) IGBrush *resolvedNeedleBrush

Declared In

IGGaugeView.h

resolvedNeedleOutline

Returns the resolved needle outline. (read-only)

@property (nonatomic, readonly) IGBrush *resolvedNeedleOutline

Declared In

IGGaugeView.h

resolvedNeedlePivotBrush

Returns the resolved needle pivot shape brush. (read-only)

@property (nonatomic, readonly) IGBrush *resolvedNeedlePivotBrush

Declared In

IGGaugeView.h

resolvedNeedlePivotOutline

Returns the resolved needle pivot shape outline. (read-only)

@property (nonatomic, readonly) IGBrush *resolvedNeedlePivotOutline

Declared In

IGGaugeView.h

resolvedRangeBrushes

Returns a resolved brush palette used by the gauge ranges.

@property (nonatomic, readonly) NSArray *resolvedRangeBrushes

Declared In

IGGaugeView.h

resolvedRangeOutlines

Returns a resolved brush palette used by the gauge range outlines.

@property (nonatomic, readonly) NSArray *resolvedRangeOutlines

Declared In

IGGaugeView.h

resolvedScaleBrush

Returns the resolved scale brush. (read-only)

@property (nonatomic, readonly) IGBrush *resolvedScaleBrush

Declared In

IGGaugeView.h

resolvedTickBrush

Returns the resolved major tickmark brush. (read-only)

@property (nonatomic, readonly) IGBrush *resolvedTickBrush

Declared In

IGGaugeView.h

scaleBrush

Determines the brush used to fill the background of the scale.

@property (nonatomic, retain) IGBrush *scaleBrush

Declared In

IGGaugeView.h

scaleEndAngle

Determines the end angle for the scale in degrees.

@property (nonatomic) CGFloat scaleEndAngle

Declared In

IGGaugeView.h

scaleEndExtent

Determines the end position of the scale measured from the center of the gauge. The value of this property should be between 0 and 1.

@property (nonatomic) CGFloat scaleEndExtent

Declared In

IGGaugeView.h

scaleOversweep

Determines the amount of extra space (in degrees) the scale will oversweep in both directions from the start and end values. This value must be greater than 0. The default value is 3.

@property (nonatomic) CGFloat scaleOversweep

Declared In

IGGaugeView.h

scaleOversweepShape

Determines the amount of oversweep applied to the scale’s backing. The default value is Auto, which uses a circular shape for a circular backing and a fitted shape for a fitted backing.

@property (nonatomic) IGGaugeScaleOversweepShape scaleOversweepShape

Declared In

IGGaugeView.h

scaleStartAngle

Determines the start angle for the scale in degrees.

@property (nonatomic) CGFloat scaleStartAngle

Declared In

IGGaugeView.h

scaleStartExtent

Determines the start position of the scale measured from the center of the gauge. The value of this property should be between 0 and 1.

@property (nonatomic) CGFloat scaleStartExtent

Declared In

IGGaugeView.h

scaleSweepDirection

Determines whether the scale sweeps clockwise or counterclockwise.

@property (nonatomic) IGSweepDirection scaleSweepDirection

Declared In

IGGaugeView.h

theme

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

@property (nonatomic, assign) id<IGGaugeThemeDefinition> theme

Declared In

IGGaugeView.h

tickBrush

Determines the brush of major tickmarks. This property is used to change the brush of the major tickmarks of the gauge scale. In order to change the brush of the minor tickmarks, use minorTickBrush property.

@property (nonatomic, retain) IGBrush *tickBrush

Declared In

IGGaugeView.h

tickEndExtent

Determines the end position of major tickmarks measured from the center of the gauge. 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

@property (nonatomic) CGFloat tickEndExtent

Declared In

IGGaugeView.h

tickStartExtent

Determines the start position of major tickmarks measured from the center of the gauge. 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.

@property (nonatomic) CGFloat tickStartExtent

Declared In

IGGaugeView.h

tickStrokeThickness

Determines the stroke thickness of the major tickmarks.

@property (nonatomic) CGFloat tickStrokeThickness

Declared In

IGGaugeView.h

transitionDuration

Determines the number of seconds over which the gauge should be animated.

@property (nonatomic) NSTimeInterval transitionDuration

Declared In

IGGaugeView.h

value

Determines the value, at which to point the needle of the gauge.

@property (nonatomic) CGFloat value

Declared In

IGGaugeView.h

Instance Methods

addRange:

Adds a range to the gauge view.

- (void)addRange:(IGGaugeRange *)range

Parameters

range

Range to be added to the gauge view.

Declared In

IGGaugeView.h

clearRanges

Removes all ranges from the gauge view.

- (void)clearRanges

Declared In

IGGaugeView.h

insertRange:atIndex:

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

- (void)insertRange:(IGGaugeRange *)range atIndex:(NSInteger)index

Parameters

range

Range to be inserted into a gauge view.

index

Index at which the range will be inserted.

Declared In

IGGaugeView.h

needleAtPoint:

Returns whether the needle exists at a specified point.

- (BOOL)needleAtPoint:(CGPoint)point

Parameters

point

A location inside of the gauge.

Declared In

IGGaugeView.h

pointForValue:atExtent:

Given a value on the gauge view, a CGPoint is returned.

- (CGPoint)pointForValue:(CGFloat)value atExtent:(CGFloat)extent

Parameters

value

A value within the gauge.

extent

The extent at which the point should be relative to.

Declared In

IGGaugeView.h

removeRange:

Removes a specified range from the gauge view.

- (void)removeRange:(IGGaugeRange *)range

Parameters

range

Range to be removed from the gauge view.

Declared In

IGGaugeView.h

valueForPoint:

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

- (CGFloat)valueForPoint:(CGPoint)point

Parameters

point

A location inside of the 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

IGGaugeView.h