PieChartData
public final class PieChartData : CTPieChartDataProtocol, Publishable
Data for drawing and styling a pie chart.
This model contains the data and styling information for a pie chart.
-
Declaration
Swift
public var id: UUID
-
Declaration
Swift
@Published public final var dataSets: PieDataSet { get set }
-
Declaration
Swift
@Published public final var metadata: ChartMetadata { get set }
-
Declaration
Swift
@Published public final var chartStyle: PieChartStyle { get set }
-
Declaration
Swift
@Published public final var legends: [LegendData] { get set }
-
Declaration
Swift
@Published public final var infoView: InfoViewData<PieChartDataPoint> { get set }
-
Undocumented
Declaration
Swift
public var subscription: Set<AnyCancellable>
-
Declaration
Swift
public let touchedDataPointPublisher: PassthroughSubject<PieChartData.DataPoint, Never>
-
Declaration
Swift
public final var noDataText: Text
-
Declaration
Swift
public final var chartType: (chartType: ChartType, dataSetType: DataSetType)
-
Undocumented
Declaration
Swift
public var disableAnimation: Bool
-
Initialises Pie Chart data.
Declaration
Swift
public init( dataSets: PieDataSet, metadata: ChartMetadata, chartStyle: PieChartStyle = PieChartStyle(), noDataText: Text = Text("No Data") )
Parameters
dataSets
Data to draw and style the chart.
metadata
Data model containing the charts Title, Subtitle and the Title for Legend.
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 getTouchInteraction(touchLocation: CGPoint, chartSize: CGRect) -> some View
-
Declaration
Swift
public typealias SetType = PieDataSet
-
Declaration
Swift
public typealias DataPoint = PieChartDataPoint
-
Declaration
Swift
public typealias CTStyle = PieChartStyle
-
Declaration
Swift
public final func getDataPoint(touchLocation: CGPoint, chartSize: CGRect)
-
Declaration
Swift
public func getPointLocation(dataSet: PieDataSet, touchLocation: CGPoint, chartSize: CGRect) -> CGPoint?