FUIChartViewDataSource
public protocol FUIChartViewDataSource : AnyObject
Data provision for chart view.
-
Required. Asks your data source object for the number of series in the chart.
Declaration
Swift
func numberOfSeries(in: FUIChartView) -> Int
-
Required. Asks your data source object for the number of values for the given series.
Declaration
Swift
func chartView(_ chartView: FUIChartView, numberOfValuesInSeries seriesIndex: Int) -> Int
-
Required. Asks your data source object for a value for a given series, value index and axis.
Declaration
Swift
func chartView(_ chartView: FUIChartView, valueForSeries seriesIndex: Int, category categoryIndex: Int, dimension dimensionIndex: Int) -> Double?
Parameters
chartView
The chart view which will present the value.
seriesIndex
Index of the series to which the value belongs.
categoryIndex
Index of the category to which the value belongs.
dimensionIndex
Index of the dimension to which the value belongs. Most chart types only have a single dimension for a single numeric axis. Scatter charts have two (x & y), and bubble charts have three (x, y, & radius).
-
chartView(_:titleForAxis:)
Default implementationOptional. Asks your data source object for the title of the given axis.
Default Implementation
Declaration
Swift
func chartView(_ chartView: FUIChartView, titleForAxis axis: FUIChartAxisId) -> String?
-
chartView(_:formattedStringForValue:axis:)
Default implementationOptional. Asks your data source object for a formatted label for a given dimension value.
Default Implementation
Declaration
Swift
func chartView(_ chartView: FUIChartView, formattedStringForValue value: Double, axis: FUIChartAxisId) -> String?
-
chartView(_:titleForCategory:inSeries:)
Default implementationOptional. Asks your data source object for a category axis label at the given index.
Default Implementation
Declaration
Swift
func chartView(_ chartView: FUIChartView, titleForCategory categoryIndex: Int, inSeries seriesIndex: Int) -> String?