Gauges: Segments

TKGauge segment is a class representing a color range indicating a portion of the gauge with different width, radius, start and end value.

Let's take a look over the segments added to a radial gauge:
The location property of TKGaugeSegment determines how far from the center the segment will be placed. Its value could be between 0 and 1.

The width of a segment is controlled by the width property which can also be between 0 and 1.

The segment has properties as fill and stroke that are used for customizing the look of the segment. And the cap property determines if the ends of the segment are rounded or edgy.

_colors = @[[UIColor colorWithRed:0.00 green:0.70 blue:0.90 alpha:1.0],
            [UIColor colorWithRed:0.38 green:0.73 blue:0.00 alpha:1.0],
            [UIColor colorWithRed:0.96 green:0.56 blue:0.00 alpha:1.0],
            [UIColor colorWithRed:0.00 green:1.00 blue:1.00 alpha:1.0],
            [UIColor colorWithRed:0.77 green:1.00 blue:0.00 alpha:1.0],
            [UIColor colorWithRed:1.00 green:0.85 blue:0.00 alpha:1.0]];
let colors = [ UIColor(red: 0.00, green: 0.70, blue: 0.90, alpha: 1.00),
               UIColor(red: 0.38, green: 0.73, blue: 0.00, alpha: 1.00),
               UIColor(red: 0.96, green: 0.56, blue: 0.00, alpha: 1.00),
               UIColor(red: 0.00, green: 1.00, blue: 1.00, alpha: 1.00),
               UIColor(red: 0.77, green: 1.00, blue: 0.00, alpha: 1.00),
               UIColor(red: 1.00, green: 0.85, blue: 0.00, alpha: 1.00) ]
this.colors = new UIColor[] { 
    new UIColor (0.00f, 0.70f, 0.90f ,1.00f),
    new UIColor (0.38f, 0.73f, 0.00f, 1.00f),
    new UIColor (0.96f, 0.56f, 0.00f, 1.00f),
    new UIColor (0.00f, 1.00f, 1.00f, 1.00f),
    new UIColor (0.77f, 1.00f, 0.00f, 1.00f),
    new UIColor (1.00f, 0.85f, 0.00f, 1.00f)
};