FUIChartSummaryItem

public class FUIChartSummaryItem : FUIChartSummaryItemType

Item summarizing the category values of series in a chart. Should be supplied to FUIChartSummaryDataSource, or, if FUIChartSummaryView.chartView == nil, set to the FUIChartSummaryView using addItem(at:).

Usage

let item = FUIChartSummaryItem()

// Category index `-1` used for 'aggregate' column. `dataSource` will request item at `-1`,
// and for indexes selected in the `chartView`, or, if `chartview == nil`,
// for indexes added using `addItem(at:)`.
item.categoryIndex = -1
item.isEnabled = false

let values: [Double] = {
    var values: [Double] = []
    let seriesCount = chartData().count
    for i in 0..<seriesCount {
       values.append(chartData()[i].map({ $0 * 1000 }).suffix(from: 1).reduce(0, +))
    }
    return values
}()

item.valuesText = values.map { formattedTitleForDouble($0)! }
item.title.text = "TTM"
  • Text which is displayed, when no data available for category for series.

    Declaration

    Swift

    public var emptyText: FUIText
  • text value for Chart title

    Declaration

    Swift

    public var title: FUIText
  • Boolean value to determine whether a user is able to interact with the control

    Declaration

    Swift

    public var isEnabled: Bool
  • boolean value to determine whether the titleHeight is being preserved

    Declaration

    Swift

    public var isPreservingTitleHeight: Bool
  • boolean value to determine whether the trendHeight is being preserved

    Declaration

    Swift

    public var isPreservingTrendHeight: Bool
  • String Array of values to display in the ChartSummary

    Declaration

    Swift

    public var valuesText: [String]
  • Set to the true categoryIndex of the item when supplying via dataSource. Set to -1, for the ‘fixed’, or ‘aggregate’ item to left.

    Declaration

    Swift

    public var categoryIndex: Int
  • Text to display for the trend

    Declaration

    Swift

    public var trend: FUIText
  • UIImage to use for the trendImage

    Declaration

    Swift

    public var trendImage: UIImage?
  • UIColor to use for the trend. Is applied to both trend and trendImage values.

    Declaration

    Swift

    public var trendSemanticColor: UIColor?