IntAxisValueFormatter.swift 369 B

12345678910111213141516
  1. //
  2. // IntAxisValueFormatter.swift
  3. // ChartsDemo-iOS
  4. //
  5. // Created by Jacob Christie on 2017-07-09.
  6. // Copyright © 2017 jc. All rights reserved.
  7. //
  8. import Foundation
  9. import Charts
  10. public class IntAxisValueFormatter: NSObject, AxisValueFormatter {
  11. public func stringForValue(_ value: Double, axis: AxisBase?) -> String {
  12. return "\(Int(value))"
  13. }
  14. }