FUIChartView
@MainActor
open class FUIChartView : UIView, FUIChartItemComponent, FUIChartSelectionComponent
A UIView subclass that displays charts.
-
Custom
UIViewto be shown when there is no data available.Declaration
Swift
@MainActor public var noDataView: UIView? { get set } -
Undocumented
Declaration
Swift
@MainActor public func refreshChartView() -
Style definition for the chart. Gives access to the chart theme palette.
Declaration
Swift
@MainActor public var style: FUIChartStyle { get set } -
Type of chart presented by the FUIChartView.
This property must be set before executing
reloadData().Declaration
Swift
@MainActor public var chartType: FUIChartType { get set } -
Delegate class for the FUIChartView.
Declaration
Swift
@MainActor public weak var delegate: FUIChartViewDelegate? { get set } -
Data source class that is reponsible for providing data for the FUIChartView. After modifying this property you will need to execute
reloadData().Declaration
Swift
@MainActor public weak var dataSource: FUIChartViewDataSource? { get set } -
Reloads the data presented by the FUIChartView.
reloadData()should be executed after thedataSourceproperty is assigned aFUIChartViewDataSourceinstance.There are other occasions where you may want to invoke this method:
- When your
FUIChartViewDataSourceimplementation has new data available. - Changing the
dataSource. - Changing the
chartType. - Modifying
numericAxisproperties such asisZeroBased,explicitMin, orexplicitMax. - Changing the
indexesOfTotalsCategories.
Declaration
Swift
@MainActor public func reloadData() - When your
-
Indicates indexes of column series for combo chart.
- Given indexes of series will be treated as column and the rest series will be treated as line.
Declaration
Swift
@MainActor public var indexesOfColumnSeries: IndexSet? { get set } -
Indicates total indexes for waterfall chart.
- Given indexes will treat the corresponding categories as totals.
- The corresponding category values in the provided data should correspond to the total sum of the preceding values.
- If the corresponding category value is nil in the provided data, the chart will complete the sum of the total value, which can be retrieved through
plotItem(atSeries:category:).
Declaration
Swift
@MainActor public var indexesOfTotalsCategories: IndexSet? { get set } -
Indicates secondary value axis series indexes for line based charts.
- The secondary value index works with .line, .area and .combo charts only.
- Given series indexes will assign the corresponding series to the secondary value axis.
Declaration
Swift
@MainActor public var indexesOfSecondaryValueAxis: IndexSet? { get set } -
Returns plot item for a given location.
Declaration
Swift
@MainActor public func plotItem(at location: CGPoint) -> FUIChartPlotItem? -
Returns plot item for given series and category.
Declaration
Swift
@MainActor public func plotItem(at series: Int, category: Int) -> FUIChartPlotItem? -
Provides attributes for the primary numeric axis.
- For clustered column, line, and combo charts this is the Y axis.
- For bar charts this is the X axis.
Declaration
Swift
@MainActor public var numericAxis: FUIChartNumericAxis { get } -
Provides attributes for the secondary numeric axis.
- For clustered line, area and combo charts this is the secondary Y axis.
Declaration
Swift
@MainActor public var secondaryNumericAxis: FUIChartNumericAxis { get } -
Provides attributes for the category axis.
- For clustered column, line, and combo charts this is the X axis.
- For bar charts this is the Y axis.
Declaration
Swift
@MainActor public var categoryAxis: FUIChartCategoryAxis { get } -
Collection of FUIChartSeries containing properties for all series provided by the FUIChartViewDataSource.
Declaration
Swift
@MainActor public var series: FUIChartSeriesCollection { get set } -
Number of gridlines that should be displayed by the chart. The actual number presented may differ depending on the chart’s data.
Declaration
Swift
@MainActor public var numberOfGridlines: Int { get set } -
Colors for any category in any series for SwiftUI charts. It is optional and will overwrite the color from seriesAttributes. Usage: [seriesIndex1: [catrgoryIndex1: HexColor, …, catrgoryIndexN: HexColor], … , seriesIndexN: [catrgoryIndex1: HexColor, …, catrgoryIndexM: HexColor]]
Declaration
Swift
@MainActor public var colorsForCategory: [Int : [Int : UIColor]] { get set } -
Determines which plot items should be selected for a category.
- single : Selects a single value in the currently selected series and category indices.
- all : Selects one value in each series for the selected category index(es).
Declaration
Swift
@MainActor public var selectionMode: FUIChartSelectionMode { get set } -
Enable or disable available user interactions on a chart
Declaration
Swift
@MainActor override public var isUserInteractionEnabled: Bool { get set } -
Default category selection mode for the chart. Defines how the initial selection is handled. Only valid values are selected. Used in combination with:
select(category:),select(categoriesInRange:),select(series:). If no series is selected throughselect(series:), the first series will be used.Declaration
Swift
@MainActor public var defaultCategorySelectionMode: ChartDefaultCategorySelectionMode -
Enable/Disable selection gestures
Declaration
Swift
@MainActor public var selectionEnabled: Bool { get set } -
When false a state is allowed in which no series is selected/active.
Declaration
Swift
@MainActor public var selectionRequired: Bool { get set } -
Indicates index of stock series for SwiftUI chart only.
Declaration
Swift
@MainActor public var indexOfStockSeries: Int { get set } -
The currently selected plot items for the FUIChartView (points, columns, bars, etc) in charts.
Declaration
Swift
@MainActor public var selections: [FUIChartPlotItem]? { get } -
Selects a category at the given index. The resulting selection(s) depend on the current
selectionMode.Declaration
Swift
@MainActor public func select(category categoryIndex: Int)Parameters
categoryIndexThe index of the category to select.
-
Selects a category range, including the lower and and upper bounds of the range. The resulting selection(s) depend on the current
selectionMode.Declaration
Swift
@MainActor public func select(categoriesInRange range: ClosedRange<Int>)Parameters
rangeThe closed range of the categories to select.
-
Selects a series at the given index. The resulting selection(s) depend on the current
selectionMode.Declaration
Swift
@MainActor public func select(series seriesIndex: Int)Parameters
seriesIndexThe index of the series to select.
-
Steps through the series in incremental order.
- Works only wing
FUIChartSelectionMode.singleenabled. - If
selectionRequiredistrueit will step through all series exluding the de-selected state. - If
selectionRequiredisfalseit will step through all series including the de-selected state.
Declaration
Swift
@MainActor public func selectNextSeries() - Works only wing
-
Selects a dimension at the given index for Scatter and bubble charts. The resulting selection(s) depend on the current
selectionMode.Declaration
Swift
@available(*, deprecated, message: "Dimension selection is not supported.") @MainActor public func select(dimension dimensionIndex: Int = 0)Parameters
dimensionThe data dimension to select in Scatter (X: 0, Y: 1) and Bubble (X: 0, Y: 1, BubbleSize: 2).
-
Deselects all currently selected plot items in the FUIChartView.
Declaration
Swift
@MainActor public func clearSelections() -
The center postion of a chart in relative coordinate system, both x and y are range from 0 to 1
Declaration
Swift
@MainActor public var centerPosition: CGPoint? { get set } -
X direction scale factor, scale is not allowed to be less than 1.0
Declaration
Swift
@MainActor public var scaleX: CGFloat { get set } -
Y direction scale factor, scale is not allowed to be less than 1.0
Declaration
Swift
@MainActor public var scaleY: CGFloat { get set } -
Enable/Disable X direction scale by gesture
Declaration
Swift
@MainActor public var scaleXEnabled: Bool { get set } -
Enable/Disable Y direction scale by gesture
Declaration
Swift
@MainActor public var scaleYEnabled: Bool { get set } -
Enable/Disable Y direction scale by gesture
Declaration
Swift
@MainActor public var readableScaleEnabled: Bool { get set } -
Chart’s data debug description.
Declaration
Swift
@MainActor public var debugDataDescription: String { get }