Structures

The following structures are available globally.

  • Corner radius of the bar shape.

    See more

    Declaration

    Swift

    public struct CornerRadius : Hashable
  • Data set for a bar chart.

    See more

    Declaration

    Swift

    public struct BarDataSet : CTStandardBarChartDataSet, DataFunctionsProtocol
  • Main data set for a grouped bar charts.

    See more

    Declaration

    Swift

    public struct GroupedBarDataSets : CTMultiDataSetProtocol, DataFunctionsProtocol
  • Individual data sets for grouped bars charts.

    See more

    Declaration

    Swift

    public struct GroupedBarDataSet : CTMultiBarChartDataSet
  • Data set for ranged bar charts.

    See more

    Declaration

    Swift

    public struct RangedBarDataSet : CTRangedBarChartDataSet, DataFunctionsProtocol
  • Main data set for a stacked bar chart.

    See more

    Declaration

    Swift

    public struct StackedBarDataSets : CTMultiDataSetProtocol, DataFunctionsProtocol
  • Individual data sets for stacked bars charts.

    See more

    Declaration

    Swift

    public struct StackedBarDataSet : CTMultiBarChartDataSet
  • Data for a single bar chart data point.

    Colour can be solid or gradient.

    See more

    Declaration

    Swift

    public struct BarChartDataPoint : CTStandardBarDataPoint
  • Data for a single grouped bar chart data point.

    See more

    Declaration

    Swift

    public struct GroupedBarDataPoint : CTMultiBarDataPoint
  • Data for a single ranged bar chart data point.

    See more

    Declaration

    Swift

    public struct RangedBarDataPoint : CTRangedBarDataPoint
  • Data for a single stacked chart data point.

    See more

    Declaration

    Swift

    public struct StackedBarDataPoint : CTMultiBarDataPoint
  • Model for grouping data points together so they can be drawn in the correct groupings.

    See more

    Declaration

    Swift

    public struct GroupingData : CTBarColourProtocol, Hashable, Identifiable
  • Control of the overall aesthetic of the bar chart.

    Controls the look of the chart as a whole, not including any styling specific to the data set(s),

    See more

    Declaration

    Swift

    public struct BarChartStyle : CTBarChartStyle
  • Model for controlling the aesthetic of the bars.

    See more

    Declaration

    Swift

    public struct BarStyle : CTBarStyle
  • View for creating a bar chart.

    Uses BarChartData data model.

    Declaration

    BarChart(chartData: data)
    

    View Modifiers

    The order of the view modifiers is some what important as the modifiers are various types for stacks that wrap around the previous views.

    .touchOverlay(chartData: data)
    .averageLine(chartData: data,
                 strokeStyle: StrokeStyle(lineWidth: 3,dash: [5,10]))
    .yAxisPOI(chartData: data,
              markerName: "50",
              markerValue: 50,
              lineColour: Color.blue,
              strokeStyle: StrokeStyle(lineWidth: 3, dash: [5,10]))
    .xAxisGrid(chartData: data)
    .yAxisGrid(chartData: data)
    .xAxisLabels(chartData: data)
    .yAxisLabels(chartData: data)
    .infoBox(chartData: data)
    .floatingInfoBox(chartData: data)
    .headerBox(chartData: data)
    .legends(chartData: data)
    
    See more

    Declaration

    Swift

    public struct BarChart<ChartData> : View where ChartData : BarChartData
  • View for creating a grouped bar chart.

    Uses GroupedBarChartData data model.

    Declaration

    GroupedBarChart(chartData: data, groupSpacing: 25)
    

    View Modifiers

    The order of the view modifiers is some what important as the modifiers are various types for stacks that wrap around the previous views.

    .touchOverlay(chartData: data)
    .averageLine(chartData: data,
    strokeStyle: StrokeStyle(lineWidth: 3,dash: [5,10]))
    .yAxisPOI(chartData: data,
              markerName: "50",
              markerValue: 50,
              lineColour: Color.blue,
              strokeStyle: StrokeStyle(lineWidth: 3, dash: [5,10]))
    .xAxisGrid(chartData: data)
    .yAxisGrid(chartData: data)
    .xAxisLabels(chartData: data)
    .yAxisLabels(chartData: data)
    .infoBox(chartData: data)
    .floatingInfoBox(chartData: data)
    .headerBox(chartData: data)
    .legends(chartData: data)
    
    See more

    Declaration

    Swift

    public struct GroupedBarChart<ChartData> : View where ChartData : GroupedBarChartData
  • Undocumented

    See more

    Declaration

    Swift

    public struct HorizontalBarChart<ChartData> : View where ChartData : HorizontalBarChartData
  • View for creating a grouped bar chart.

    Uses RangedBarChartData data model.

    Declaration

    RangedBarChart(chartData: data)
    

    View Modifiers

    The order of the view modifiers is some what important as the modifiers are various types for stacks that wrap around the previous views.

    .touchOverlay(chartData: data)
    .averageLine(chartData: data,
                 strokeStyle: StrokeStyle(lineWidth: 3,dash: [5,10]))
    .yAxisPOI(chartData: data,
              markerName: "50",
              markerValue: 50,
              lineColour: Color.blue,
              strokeStyle: StrokeStyle(lineWidth: 3, dash: [5,10]))
    .xAxisGrid(chartData: data)
    .yAxisGrid(chartData: data)
    .xAxisLabels(chartData: data)
    .yAxisLabels(chartData: data)
    .infoBox(chartData: data)
    .floatingInfoBox(chartData: data)
    .headerBox(chartData: data)
    .legends(chartData: data)
    
    See more

    Declaration

    Swift

    public struct RangedBarChart<ChartData> : View where ChartData : RangedBarChartData
  • View for creating a stacked bar chart.

    Uses StackedBarChartData data model.

    Declaration

    StackedBarChart(chartData: data)
    

    View Modifiers

    The order of the view modifiers is some what important as the modifiers are various types for stacks that wrap around the previous views.

    .touchOverlay(chartData: data)
    .averageLine(chartData: data,
                 strokeStyle: StrokeStyle(lineWidth: 3,dash: [5,10]))
    .yAxisPOI(chartData: data,
              markerName: "50",
              markerValue: 50,
              lineColour: Color.blue,
              strokeStyle: StrokeStyle(lineWidth: 3, dash: [5,10]))
    .xAxisGrid(chartData: data)
    .yAxisGrid(chartData: data)
    .xAxisLabels(chartData: data)
    .yAxisLabels(chartData: data)
    .infoBox(chartData: data)
    .floatingInfoBox(chartData: data)
    .headerBox(chartData: data)
    .legends(chartData: data)
    
    See more

    Declaration

    Swift

    public struct StackedBarChart<ChartData> : View where ChartData : StackedBarChartData
  • Data for a single data point.

    See more

    Declaration

    Swift

    public struct LineChartDataPoint : CTStandardLineDataPoint, IgnoreMe
  • Data for a single ranged data point.

    See more

    Declaration

    Swift

    public struct RangedLineChartDataPoint : CTRangedLineDataPoint, IgnoreMe
  • Data set for a single line

    Contains information specific to each line within the chart .

    See more

    Declaration

    Swift

    public struct LineDataSet : CTLineChartDataSet, DataFunctionsProtocol
  • Data set containing multiple data sets for multiple lines

    Contains information about each of lines within the chart.

    See more

    Declaration

    Swift

    public struct MultiLineDataSet : CTMultiLineChartDataSet, DataFunctionsProtocol
  • Data set for a ranged line.

    Contains information specific to the line and range fill.

    See more

    Declaration

    Swift

    public struct RangedLineDataSet : CTRangedLineChartDataSet, DataFunctionsProtocol
  • Control of the overall aesthetic of the line chart.

    Controls the look of the chart as a whole, not including any styling specific to the data set(s),

    See more

    Declaration

    Swift

    public struct LineChartStyle : CTLineChartStyle
  • Model for controlling the styling for individual lines.

    See more

    Declaration

    Swift

    public struct LineStyle : CTLineStyle, Hashable
  • Model for controlling the aesthetic of the point markers.

    Point markers are placed on top of the line, marking where the data points are.

    See more

    Declaration

    Swift

    public struct PointStyle : Hashable
  • Undocumented

    See more

    Declaration

    Swift

    public struct PointColour : Hashable
  • Model for controlling the aesthetic of the ranged line chart.

    See more

    Declaration

    Swift

    public struct RangedLineStyle : CTRangedLineStyle, Hashable
  • View for creating a filled line chart.

    Uses LineChartData data model.

    Declaration

    FilledLineChart(chartData: data)
    

    View Modifiers

    The order of the view modifiers is some what important as the modifiers are various types for stacks that wrap around the previous views.

    .touchOverlay(chartData: data)
    .pointMarkers(chartData: data)
    .averageLine(chartData: data,
                 strokeStyle: StrokeStyle(lineWidth: 3,dash: [5,10]))
    .yAxisPOI(chartData: data,
              markerName: "50",
              markerValue: 50,
              lineColour: Color.blue,
              strokeStyle: StrokeStyle(lineWidth: 3, dash: [5,10]))
    .xAxisGrid(chartData: data)
    .yAxisGrid(chartData: data)
    .xAxisLabels(chartData: data)
    .yAxisLabels(chartData: data)
    .infoBox(chartData: data)
    .floatingInfoBox(chartData: data)
    .headerBox(chartData: data)
    .legends(chartData: data)
    
    See more

    Declaration

    Swift

    public struct FilledLineChart<ChartData> : View where ChartData : LineChartData
  • View for drawing a line chart.

    Uses LineChartData data model.

    Declaration

    LineChart(chartData: data)
    

    View Modifiers

    The order of the view modifiers is some what important as the modifiers are various types for stacks that wrap around the previous views.

    .pointMarkers(chartData: data)
    .touchOverlay(chartData: data, specifier: "%.0f")
    .yAxisPOI(chartData: data,
              markerName: "Something",
              markerValue: 110,
              labelPosition: .center(specifier: "%.0f"),
              labelColour: Color.white,
              labelBackground: Color.blue,
              lineColour: Color.blue,
              strokeStyle: StrokeStyle(lineWidth: 3, dash: [5,10]))
    .averageLine(chartData: data,
                 strokeStyle: StrokeStyle(lineWidth: 3, dash: [5,10]))
    .xAxisGrid(chartData: data)
    .yAxisGrid(chartData: data)
    .xAxisLabels(chartData: data)
    .yAxisLabels(chartData: data)
    .infoBox(chartData: data)
    .floatingInfoBox(chartData: data)
    .headerBox(chartData: data)
    .legends(chartData: data, columns: [GridItem(.flexible()), GridItem(.flexible())])
    
    See more

    Declaration

    Swift

    public struct LineChart<ChartData> : View where ChartData : LineChartData
  • View for drawing a multi-line, line chart.

    Uses MultiLineChartData data model.

    Declaration

    MultiLineChart(chartData: data)
    

    View Modifiers

    The order of the view modifiers is some what important as the modifiers are various types for stacks that wrap around the previous views.

    .touchOverlay(chartData: data)
    .pointMarkers(chartData: data)
    .averageLine(chartData: data,
                 strokeStyle: StrokeStyle(lineWidth: 3, dash: [5,10]))
    .yAxisPOI(chartData: data,
              markerName: "50",
              markerValue: 50,
              lineColour: Color.blue,
              strokeStyle: StrokeStyle(lineWidth: 3, dash: [5,10]))
    .xAxisGrid(chartData: data)
    .yAxisGrid(chartData: data)
    .xAxisLabels(chartData: data)
    .yAxisLabels(chartData: data)
    .infoBox(chartData: data)
    .floatingInfoBox(chartData: data)
    .headerBox(chartData: data)
    .legends(chartData: data)
    
    See more

    Declaration

    Swift

    public struct MultiLineChart<ChartData> : View where ChartData : MultiLineChartData
  • View for drawing a line chart with upper and lower range values .

    Uses RangedLineChartData data model.

    Declaration

    RangedLineChart(chartData: data)
    

    View Modifiers

    The order of the view modifiers is some what important as the modifiers are various types for stacks that wrap around the previous views.

    .pointMarkers(chartData: data)
    .touchOverlay(chartData: data, specifier: "%.0f")
    .yAxisPOI(chartData: data,
              markerName: "Something",
              markerValue: 110,
              labelPosition: .center(specifier: "%.0f"),
              labelColour: Color.white,
              labelBackground: Color.blue,
              lineColour: Color.blue,
              strokeStyle: StrokeStyle(lineWidth: 3, dash: [5,10]))
    .averageLine(chartData: data,
                 strokeStyle: StrokeStyle(lineWidth: 3, dash: [5,10]))
    .xAxisGrid(chartData: data)
    .yAxisGrid(chartData: data)
    .xAxisLabels(chartData: data)
    .yAxisLabels(chartData: data)
    .infoBox(chartData: data)
    .floatingInfoBox(chartData: data)
    .headerBox(chartData: data)
    .legends(chartData: data, columns: [GridItem(.flexible()), GridItem(.flexible())])
    
    See more

    Declaration

    Swift

    public struct RangedLineChart<ChartData> : View where ChartData : RangedLineChartData
  • Styling of the dot that follows the line on touch events.

    See more

    Declaration

    Swift

    public struct DotStyle
  • Data for a single segement of a pie chart.

    See more

    Declaration

    Swift

    public struct PieChartDataPoint : CTPieDataPoint
  • Data set for a pie chart.

    See more

    Declaration

    Swift

    public struct PieDataSet : CTSingleDataSetProtocol
  • Model for controlling the overall aesthetic of the chart.

    See more

    Declaration

    Swift

    public struct DoughnutChartStyle : CTDoughnutChartStyle
  • Model for controlling the overall aesthetic of the chart.

    See more

    Declaration

    Swift

    public struct PieChartStyle : CTPieChartStyle
  • View for creating a doughnut chart.

    Uses DoughnutChartData data model.

    Declaration

    DoughnutChart(chartData: data)
    

    View Modifiers

    The order of the view modifiers is some what important as the modifiers are various types for stacks that wrap around the previous views.

    .touchOverlay(chartData: data)
    .infoBox(chartData: data)
    .floatingInfoBox(chartData: data)
    .headerBox(chartData: data)
    .legends(chartData: data)
    
    See more

    Declaration

    Swift

    public struct DoughnutChart<ChartData> : View where ChartData : DoughnutChartData
  • View for creating a pie chart.

    Uses PieChartData data model.

    Declaration

    PieChart(chartData: data)
    

    View Modifiers

    The order of the view modifiers is some what important as the modifiers are various types for stacks that wrap around the previous views.

    .touchOverlay(chartData: data)
    .infoBox(chartData: data)
    .floatingInfoBox(chartData: data)
    .headerBox(chartData: data)
    .legends(chartData: data)
    
    See more

    Declaration

    Swift

    public struct PieChart<ChartData> : View where ChartData : PieChartData
  • Displays the data points value with the unit.

    See more

    Declaration

    Swift

    public struct InfoValue<T> : View where T : CTChartData
  • Displays the data points description.

    See more

    Declaration

    Swift

    public struct InfoDescription<T> : View where T : CTChartData
  • Option the as a String between the Value and the Description.

    See more

    Declaration

    Swift

    public struct InfoExtra<T> : View where T : CTChartData
  • Data model to hold data for Legends

    See more

    Declaration

    Swift

    public struct LegendData : Hashable, Identifiable
  • Data model for the chart’s metadata

    Contains the Title, Subtitle and colour information for them.

    See more

    Declaration

    Swift

    public struct ChartMetadata
  • Model for setting up colour styling.

    See more

    Declaration

    Swift

    public struct ColourStyle : CTColourStyle, Hashable
  • Data model to pass view information internally for the InfoBox, FloatingInfoBox and HeaderBox.

    Declaration

    Swift

    public struct InfoViewData<DP> where DP : CTDataPointBaseProtocol
  • A mediator for Gradient.Stop to allow it to be stored in LegendData.

    Gradient.Stop doesn’t conform to Hashable.

    See more

    Declaration

    Swift

    public struct GradientStop : Hashable
  • A hashable version of StrokeStyle

    StrokeStyle doesn’t conform to Hashable.

    See more

    Declaration

    Swift

    public struct Stroke : Hashable, Identifiable
  • View to display text if there is not enough data to draw the chart.

    See more

    Declaration

    Swift

    public struct CustomNoDataView<T> : View where T : CTChartData
  • Data model to pass view information internally so the layout can configure its self.

    Declaration

    Swift

    public struct ChartViewData
  • Data for drawing and styling the Extra Line view modifier.

    This model contains the data and styling information for a single line, line chart.

    See more

    Declaration

    Swift

    public struct ExtraLineData : Identifiable
  • Data point for Extra line View Modifier.

    See more

    Declaration

    Swift

    public struct ExtraLineDataPoint : Hashable, Identifiable
  • Control for the look of the Grid

    See more

    Declaration

    Swift

    public struct GridStyle
  • Shape used in POI Markers when displaying value in the center.

    See more

    Declaration

    Swift

    public struct DiamondShape : Shape

Ordinate

  • Custom Label Shape used in POI Markers when displaying POI values.

    See more

    Declaration

    Swift

    public struct CustomLabelShape : Shape
  • Shape used in POI Markers when displaying value in the Y axis labels on the leading edge.

    See more

    Declaration

    Swift

    public struct LeadingLabelShape : Shape
  • Shape used in POI Markers when displaying value in the Y axis labels on the trailing edge.

    See more

    Declaration

    Swift

    public struct TrailingLabelShape : Shape
  • Shape used in POI Markers when displaying value in the X axis labels on the bottom edge.

    See more

    Declaration

    Swift

    public struct BottomLabelShape : Shape
  • Shape used in POI Markers when displaying value in the X axis labels on the top edge.

    See more

    Declaration

    Swift

    public struct TopLabelShape : Shape
  • Control of the styling of the Extra Line.

    See more

    Declaration

    Swift

    public struct ExtraLineStyle