LineChartData
public final class LineChartData : CTLineChartDataProtocol, GetDataProtocol, Publishable, PointOfInterestProtocol
Data for drawing and styling a single line, line chart.
This model contains the data and styling information for a single line, line chart.
-
Declaration
Swift
public final let id: UUID
-
Declaration
Swift
@Published public final var dataSets: LineDataSet { 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 chartStyle: LineChartStyle { 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<LineChartDataPoint> { get set }
-
Declaration
Swift
public final var noDataText: Text
-
Declaration
Swift
public final var chartType: (chartType: ChartType, dataSetType: DataSetType)
-
Declaration
Swift
@Published public final var extraLineData: ExtraLineData? { get set }
-
Undocumented
Declaration
Swift
public var subscription: Set<AnyCancellable>
-
Declaration
Swift
public let touchedDataPointPublisher: PassthroughSubject<LineChartData.DataPoint, Never>
-
Undocumented
Declaration
Swift
public var disableAnimation: Bool
-
Initialises a Single Line Chart.
Declaration
Swift
public init( dataSets: LineDataSet, metadata: ChartMetadata = ChartMetadata(), xAxisLabels: [String]? = nil, yAxisLabels: [String]? = nil, chartStyle: LineChartStyle = LineChartStyle(), noDataText: Text = Text("No Data") )
Parameters
dataSets
Data to draw and style a line.
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.
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 getPointMarker() -> some View
-
Declaration
Swift
public final func getTouchInteraction(touchLocation: CGPoint, chartSize: CGRect) -> some View
-
Declaration
Swift
public typealias SetType = LineDataSet
-
Declaration
Swift
public typealias DataPoint = LineChartDataPoint
-
Declaration
Swift
public final func getPointLocation(dataSet: LineDataSet, touchLocation: CGPoint, chartSize: CGRect) -> CGPoint?
-
Declaration
Swift
public final func getDataPoint(touchLocation: CGPoint, chartSize: CGRect)