PieChartDataPoint

public struct PieChartDataPoint : CTPieDataPoint

Data for a single segement of a pie chart.

  • id

    Declaration

    Swift

    public var id: UUID
  • Declaration

    Swift

    public var value: Double
  • Declaration

    Swift

    public var description: String?
  • Declaration

    Swift

    public var date: Date?
  • Declaration

    Swift

    public var colour: Color
  • Declaration

    Swift

    public var label: OverlayType
  • Declaration

    Swift

    public var startAngle: Double
  • Declaration

    Swift

    public var amount: Double
  • Declaration

    Swift

    public var legendTag: String
  • Data model for a single data point for a pie chart.

    Declaration

    Swift

    public init(
        value: Double,
        description: String? = nil,
        date: Date? = nil,
        colour: Color = Color.red,
        label: OverlayType = .none
    )

    Parameters

    value

    Value of the data point

    description

    A longer label that can be shown on touch input.

    date

    Date of the data point if any data based calculations are required.

    colour

    Colour of the segment.

    label

    Option to add overlays on top of the segment.

  • Declaration

    Swift

    public static func == (left: PieChartDataPoint, right: PieChartDataPoint) -> Bool