FillFormatter.swift 696 B

123456789101112131415161718192021
  1. //
  2. // FillFormatter.swift
  3. // Charts
  4. //
  5. // Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda
  6. // A port of MPAndroidChart for iOS
  7. // Licensed under Apache License 2.0
  8. //
  9. // https://github.com/danielgindi/Charts
  10. //
  11. import Foundation
  12. import CoreGraphics
  13. /// Protocol for providing a custom logic to where the filling line of a LineDataSet should end. This of course only works if setFillEnabled(...) is set to true.
  14. @objc(ChartFillFormatter)
  15. public protocol FillFormatter
  16. {
  17. /// - Returns: The vertical (y-axis) position where the filled-line of the LineDataSet should end.
  18. func getFillLinePosition(dataSet: LineChartDataSetProtocol, dataProvider: LineChartDataProvider) -> CGFloat
  19. }