iOS Charting Documentation - SciChart iOS Charts SDK v3.x

SCIPieDonutRenderableSeriesBase

@interface SCIPieDonutRenderableSeriesBase
    : NSObject <ISCIPieRenderableSeries> {
  float _animationProgress;
  double _totalValue;
}

Defines the Base class for for renderable series which are used within SCIPieChartSurface.

  • Duration of appear animation in seconds.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) double appearAnimationDuration;

    Swift

    var appearAnimationDuration: Double { get set }
  • Draw labels if true.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL drawLabels;

    Swift

    var drawLabels: Bool { get set }
  • Gets or sets distance between segments in circle

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) float segmentSpacing;

    Swift

    var segmentSpacing: Float { get set }
  • Draws segment for pie or donut renderable series.

    Declaration

    Objective-C

    - (void)internalDrawSegment:(SCIPieSegment *)segment
                 withStartAngle:(double)startAngle
                   segmentAngle:(double)segmentAngle;

    Swift

    func internalDraw(_ segment: SCIPieSegment!, withStartAngle startAngle: Double, segmentAngle: Double)
  • Gets he segment pathfor pie or donut renderable series. Must be inmpelemted in the subclass.

    Declaration

    Objective-C

    - (CGMutablePathRef)getSegmentPath:(SCIPieSegment *)segment
                                center:(CGPoint)center
                            startAngle:(double)startAngle
                              endAngle:(double)endAngle;

    Swift

    func getSegmentPath(_ segment: SCIPieSegment!, center: CGPoint, startAngle: Double, endAngle: Double) -> Unmanaged<CGMutablePath>!
  • Draws segment label for pie or donut renderable series. Must be inmpelemted in the subclass.

    Declaration

    Objective-C

    - (void)drawSegmentLabel:(SCIPieSegment *)segment
                      center:(CGPoint)center
                  startAngle:(double)startAngle
                    endAngle:(double)endAngle;

    Swift

    func drawSegmentLabel(_ segment: SCIPieSegment!, center: CGPoint, startAngle: Double, endAngle: Double)
  • Draws segment label for pie or donut renderable series.

    Declaration

    Objective-C

    - (void)drawSegmentLabel:(SCIPieSegment *)segment
                      center:(CGPoint)center
          textPlacementAngle:(double)textPlacementAngle
          distanceFromCenter:(double)distanceFromCenter;

    Swift

    func drawSegmentLabel(_ segment: SCIPieSegment!, center: CGPoint, textPlacementAngle: Double, distanceFromCenter: Double)
  • Return text to be placed on segment. By default it’s % from total value

    Declaration

    Objective-C

    - (NSString *)getLabelTextForSegment:(SCIPieSegment *)segment
                              totalValue:(double)value;

    Swift

    func getLabelText(for segment: SCIPieSegment!, totalValue value: Double) -> String!

    Parameters

    segment

    SCIPieSegment segment for which text is generated

    value

    total value of all segments in series

  • Start appear animation.

    Declaration

    Objective-C

    - (void)startAnimation;

    Swift

    func startAnimation()
  • Method called internally to calculate current animation state.

    Declaration

    Objective-C

    - (BOOL)updateAnimationState:(CFTimeInterval)timeInterval;

    Swift

    func updateAnimationState(_ timeInterval: CFTimeInterval) -> Bool
  • Check’s if pie or donut series are hit using radius. Returns -1 if false. Must be inmpelemted in the subclass.

    Declaration

    Objective-C

    - (BOOL)isSegmentInRadius:(double)radius
                   withCenter:(CGPoint)center
                      atPoint:(CGPoint)point;

    Swift

    func isSegment(inRadius radius: Double, withCenter center: CGPoint, at point: CGPoint) -> Bool