HorizontalBarChartData
public final class HorizontalBarChartData : CTHorizontalBarChartDataProtocol, GetDataProtocol, Publishable, PointOfInterestProtocol
Data for drawing and styling a standard Bar Chart.
-
Declaration
Swift
public let id: UUID
-
Declaration
Swift
@Published public final var dataSets: BarDataSet { get set }
-
Declaration
Swift
@Published public final var metadata: ChartMetadata { get set }
-
Declaration
Swift
@Published public final var xAxisLabels: [String]? { get set }
-
Declaration
Swift
@Published public final var yAxisLabels: [String]? { get set }
-
Declaration
Swift
@Published public final var barStyle: BarStyle { get set }
-
Declaration
Swift
@Published public final var chartStyle: BarChartStyle { get set }
-
Declaration
Swift
@Published public final var legends: [LegendData] { get set }
-
Declaration
Swift
@Published public final var viewData: ChartViewData { get set }
-
Declaration
Swift
@Published public final var infoView: InfoViewData<BarChartDataPoint> { get set }
-
Declaration
Swift
@Published public final var extraLineData: ExtraLineData? { get set }
-
Undocumented
Declaration
Swift
public var subscription: Set<AnyCancellable>
-
Declaration
Swift
public let touchedDataPointPublisher: PassthroughSubject<HorizontalBarChartData.DataPoint, Never>
-
Declaration
Swift
public final var noDataText: Text
-
Declaration
Swift
public final let chartType: (chartType: ChartType, dataSetType: DataSetType)
-
Undocumented
Declaration
Swift
public var disableAnimation: Bool
-
Initialises a standard Bar Chart.
Declaration
Swift
public init( dataSets: BarDataSet, metadata: ChartMetadata = ChartMetadata(), xAxisLabels: [String]? = nil, yAxisLabels: [String]? = nil, barStyle: BarStyle = BarStyle(), chartStyle: BarChartStyle = BarChartStyle(), noDataText: Text = Text("No Data") )
Parameters
dataSets
Data to draw and style the bars.
metadata
Data model containing the charts Title, Subtitle and the Title for Legend.
xAxisLabels
Labels for the X axis instead of the labels in the data points.
yAxisLabels
Labels for the Y axis instead of the labels generated from data point values.
barStyle
Control for the aesthetic of the bar chart.
chartStyle
The style data for the aesthetic of the chart.
noDataText
Customisable Text to display when where is not enough data to draw the chart.
-
Declaration
Swift
public final func getXAxisLabels() -> some View
-
Declaration
Swift
public final func getYAxisLabels() -> some View
-
Declaration
Swift
public final func getTouchInteraction(touchLocation: CGPoint, chartSize: CGRect) -> some View
-
Declaration
Swift
public final func getDataPoint(touchLocation: CGPoint, chartSize: CGRect)
-
Declaration
Swift
public final func getPointLocation(dataSet: BarDataSet, touchLocation: CGPoint, chartSize: CGRect) -> CGPoint?
-
Declaration
Swift
public typealias SetType = BarDataSet
-
Declaration
Swift
public typealias DataPoint = BarChartDataPoint
-
Declaration
Swift
public typealias CTStyle = BarChartStyle