FUIChartRangeSummaryItem

public class FUIChartRangeSummaryItem : 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 value for Chart title

    Declaration

    Swift

    public var lowerBoundTitle: FUIText
  • text value for Chart title

    Declaration

    Swift

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

    Declaration

    Swift

    public var isEnabled: Bool
  • Aggregate value to display in the ChartSummary

    Declaration

    Swift

    public var value: FUIText
  • 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 categoryRange: ClosedRange<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?
  • lowerBound of categoryRange

    Declaration

    Swift

    public var sortableCategoryRange: Int { get }