CTLineBarChartDataProtocol

public protocol CTLineBarChartDataProtocol : CTChartData where Self.CTStyle : CTLineBarChartStyle

A protocol to extend functionality of CTChartData specifically for Line and Bar Charts.

  • Array of strings for the labels on the X Axis instead of the labels in the data points.

    Declaration

    Swift

    var xAxisLabels: [String]? { get set }
  • Array of strings for the labels on the Y Axis instead of the labels generated from data point values.

    Declaration

    Swift

    var yAxisLabels: [String]? { get set }
  • Data model to hold data about the Views layout.

    This informs some ViewModifiers whether the chart has X and/or Y axis labels so they can configure thier layouts appropriately.

    Declaration

    Swift

    var viewData: ChartViewData { get set }
  • A data model for the ExtraLine View Modifier

    Declaration

    Swift

    var extraLineData: ExtraLineData? { get set }
  • A type representing a View for displaying second set of labels on the Y axis.

    Declaration

    Swift

    associatedtype ExtraYLabels : View
  • getExtraYAxisLabels() Default implementation

    View for displaying second set of labels on the Y axis.

    Default Implementation

    Declaration

    Swift

    func getExtraYAxisLabels() -> ExtraYLabels
  • Get the relevant colour indicator for the y axis labels.

    Declaration

    Swift

    func getColour() -> ColourStyle
  • A type representing a View for displaying labels on the X axis.

    Declaration

    Swift

    associatedtype XLabels : View
  • Displays a view for the labels on the X Axis.

    Declaration

    Swift

    func getXAxisLabels() -> XLabels
  • A type representing a View for displaying labels on the X axis.

    Declaration

    Swift

    associatedtype YLabels : View
  • Displays a view for the labels on the Y Axis.

    Declaration

    Swift

    func getYAxisLabels() -> YLabels
  • Sets the data point info box location while keeping it within the parent view.

    Default Implementation

    Declaration

    Swift

    func setBoxLocation(touchLocation: CGFloat, boxFrame: CGRect, chartSize: CGRect) -> CGFloat

    Parameters

    touchLocation

    Location the user has pressed.

    boxFrame

    The size of the point info box.

    chartSize

    The size of the chart view as the parent view.

Box Location

Axes Titles

  • getYAxisTitle(colour:) Extension method

    Returns the title for y axis.

    This also informs ViewData of it width so that the positioning of the views in the x axis can be calculated.

    Declaration

    Swift

    public func getYAxisTitle(colour: AxisColour) -> some View

Extra Y Axis Labels

Available where Self: isHorizontal

Available where Self: GetDataProtocol, SetType: DataFunctionsProtocol

  • range Extension method

    Undocumented

    Declaration

    Swift

    public var range: Double { get }
  • minValue Extension method

    Undocumented

    Declaration

    Swift

    public var minValue: Double { get }
  • maxValue Extension method

    Undocumented

    Declaration

    Swift

    public var maxValue: Double { get }
  • average Extension method

    Undocumented

    Declaration

    Swift

    public var average: Double { get }

Available where Self: PointOfInterestProtocol

Available where Self: PointOfInterestProtocol & isHorizontal

Available where Self: PointOfInterestProtocol

Available where Self: PointOfInterestProtocol & isHorizontal