Inherits from NSObject
Declared in SGaugeQualitativeRange.h
Availability
Related samples

Overview

An SGaugeQualitativeRange describes a color range on the SGaugeAxis.

For example, to set the ranges as 55 to 65 as yellow, 65 to 70 as orange, and 70+ as red:

gauge.qualitativeRanges = @[
    [SGaugeQualitativeRange rangeWithMinimum:@55 maximum:@65 color:[ UIColor yellowColor ]],
    [SGaugeQualitativeRange rangeWithMinimum:@65 maximum:@70 color:[ UIColor orangeColor ]],
    [SGaugeQualitativeRange rangeWithMinimum:@70 maximum:nil color:[ UIColor redColor ]]];

The size of the range drawn on the axis can be configured with the qualitativeRangeInnerPosition and qualitativeRangeOuterPosition property on the SGaugeStyle.

Tasks

Properties

color

The color of the range

@property (nonatomic, readonly) UIColor *color

Declared In

SGaugeQualitativeRange.h

maximum

The maximum value to which the color will be rendered.

@property (nonatomic, readonly) NSNumber *maximum

Declared In

SGaugeQualitativeRange.h

minimum

The minimum value at which the color will be rendered.

@property (nonatomic, readonly) NSNumber *minimum

Declared In

SGaugeQualitativeRange.h

Class Methods

rangeWithMinimum:maximum:color:

Factory method to create a range with a given minimum, maximum and color.

+ (id)rangeWithMinimum:(NSNumber *)minimum maximum:(NSNumber *)maximum color:(UIColor *)color

Parameters

minimum

The minimum value at which the color will be rendered. If set to nil, the minimum range of the gauge will be used.

maximum

The maximum value at which the color will be rendered. If set to nil, the maximum range of the gauge will be used.

color

The color of the range to render.

Declared In

SGaugeQualitativeRange.h

Instance Methods

initWithMinimum:maximum:color:

Create a range with a given minimum, maximum and color.

- (id)initWithMinimum:(NSNumber *)minimum maximum:(NSNumber *)maximum color:(UIColor *)color

Parameters

minimum

The minimum value at which the color will be rendered. If set to nil, the minimum range of the gauge will be used.

maximum

The maximum value at which the color will be rendered. If set to nil, the maximum range of the gauge will be used.

color

The color of the range to render.

Declared In

SGaugeQualitativeRange.h