Enumerations

The following enumerations are available globally.

  • Where to get the colour data from.

    case barStyle // From BarStyle data model
    case dataPoints // From each data point
    
    See more

    Declaration

    Swift

    public enum ColourFrom
  • Where the marker lines come from to meet at a specified point.

    case none // No overlay markers.
    case vertical // Vertical line from top to bottom.
    case full // Full width and height of view intersecting at a specified point.
    case bottomLeading // From bottom and leading edges meeting at a specified point.
    case bottomTrailing // From bottom and trailing edges meeting at a specified point.
    case topLeading // From top and leading edges meeting at a specified point.
    case topTrailing // From top and trailing edges meeting at a specified point.
    
    See more

    Declaration

    Swift

    public enum BarMarkerType : MarkerType
  • Drawing style of the line

    case line // Straight line from point to point
    case curvedLine // Dual control point curved line
    case stepped // Stepped line from point to point
    
    See more

    Declaration

    Swift

    public enum LineType
  • Style of the point marks

    case filled // Just fill
    case outline // Just stroke
    case filledOutLine // Both fill and stroke
    
    See more

    Declaration

    Swift

    public enum PointType
  • Shape of the points

    case circle
    case square
    case roundSquare
    
    See more

    Declaration

    Swift

    public enum PointShape
  • Where the Y and X touch markers should attach themselves to.

    case line(dot: Dot) // Attached to the line.
    case point // Attached to the data points.
    
    See more

    Declaration

    Swift

    public enum MarkerAttachment
  • Where the marker lines come from to meet at a specified point.

    case none // No overlay markers.
    case indicator(style: DotStyle) // Dot that follows the path.
    case vertical(attachment: MarkerAttachment) // Vertical line from top to bottom.
    case full(attachment: MarkerAttachment) // Full width and height of view intersecting at a specified point.
    case bottomLeading(attachment: MarkerAttachment) // From bottom and leading edges meeting at a specified point.
    case bottomTrailing(attachment: MarkerAttachment) // From bottom and trailing edges meeting at a specified point.
    case topLeading(attachment: MarkerAttachment) // From top and leading edges meeting at a specified point.
    case topTrailing(attachment: MarkerAttachment) // From top and trailing edges meeting at a specified point.
    
    See more

    Declaration

    Swift

    public enum LineMarkerType : MarkerType
  • Dot

    Whether or not to show a dot on the line

    case none // No Dot
    case style(_ style: DotStyle) // Adds a dot the line at point of touch.
    
    See more

    Declaration

    Swift

    public enum Dot
  • Option to add overlays on top of the segment.

    case none // No overlay
    case barStyle // Text overlay
    case dataPoints // System icon overlay
    
    See more

    Declaration

    Swift

    public enum OverlayType : Hashable

ChartViewData

  • The type of DataSet being used

    case single // Single data set - i.e LineDataSet
    case multi // Multi data set - i.e MultiLineDataSet
    
    See more

    Declaration

    Swift

    public enum DataSetType
  • The type of chart being used.

    case line // Line Chart Type
    case bar // Bar Chart Type
    case pie // Pie Chart Type
    
    See more

    Declaration

    Swift

    public enum ChartType

Style

  • Type of colour styling.

    case colour // Single Colour
    case gradientColour // Colour Gradient
    case gradientStops // Colour Gradient with stop control
    
    See more

    Declaration

    Swift

    public enum ColourType

TouchOverlay

  • Placement of the data point information panel when touch overlay modifier is applied.

    case floating // Follows input across the chart.
    case infoBox(isStatic: Bool)  // Display in the InfoBox. Must have .infoBox()
    case header // Fix in the Header box. Must have .headerBox().
    
    See more

    Declaration

    Swift

    public enum InfoBoxPlacement
  • Alignment of the content inside of the information box

    case vertical // Puts the legend, value and description verticaly
    case horizontal // Puts the legend, value and description horizontaly
    
    See more

    Declaration

    Swift

    public enum InfoBoxAlignment
  • Option to display units before or after values.

    case none // No unit
    case prefix(of: String) // Before value
    case suffix(of: String) // After value
    
    See more

    Declaration

    Swift

    public enum TouchUnit

XAxisLabels

  • Location of the X axis labels

    case top
    case bottom
    
    See more

    Declaration

    Swift

    public enum XAxisLabelPosistion
  • Where the label data come from.

    xAxisLabel comes from ChartData –> DataPoint model.

    xAxisLabels comes from ChartData –> xAxisLabels

    case dataPoint // ChartData --> DataPoint --> xAxisLabel
    case chartData // ChartData --> xAxisLabels
    
    See more

    Declaration

    Swift

    public enum LabelsFrom

YAxisLabels

  • Location of the Y axis labels

    case leading
    case trailing
    
    See more

    Declaration

    Swift

    public enum YAxisLabelPosistion
  • Option to display the markers’ value inline with the marker..

    case none // No label.
    case yAxis(specifier: String, formatter: NumberFormatter? = nil) // Places the label in the yAxis labels.
    case center(specifier: String, formatter: NumberFormatter? = nil) // Places the label in the center of chart.
    case position(location: CGFloat, specifier: String, formatter: NumberFormatter? = nil) // Places the label at a relative position from leading edge.
    
    See more

    Declaration

    Swift

    public enum DisplayValue
  • Where to start drawing the line chart from.

    case minimumValue // Lowest value in the data set(s)
    case minimumWithMaximum(of: Double) // Set a custom baseline
    case zero // Set 0 as the lowest value
    
    See more

    Declaration

    Swift

    public enum Baseline : Hashable
  • Where to end drawing the chart.

    case maximumValue // Highest value in the data set(s)
    case maximum(of: Double) // Set a custom topline
    
    See more

    Declaration

    Swift

    public enum Topline : Hashable
  • Option to choose between auto generated, numeric labels or custum array of strings.

    Custom is set from ChartData -> yAxisLabels

    case numeric // Auto generated, numeric labels.
    case custom // Custom labels array -- `ChartData -> yAxisLabels`
    
    See more

    Declaration

    Swift

    public enum YAxisLabelType

Extra Y Axis

  • Controls how second Y Axis will be styled.

    case none // No colour marker.
    case style(size: CGFloat) // Get style from data model.
    case custom(colour: ColourStyle, size: CGFloat) // Set custom style.
    
    See more

    Declaration

    Swift

    public enum AxisColour