package net.pokeranalytics.android.ui.graph

import com.github.mikephil.charting.components.AxisBase
import com.github.mikephil.charting.formatter.ValueFormatter
import net.pokeranalytics.android.util.extensions.kmbFormatted
import kotlin.math.roundToInt

class LargeNumberFormatter : ValueFormatter() {

	override fun getFormattedValue(value: Float): String {
		return value.kmbFormatted()
	}

	override fun getAxisLabel(value: Float, axis: AxisBase?): String {
		return value.roundToInt().kmbFormatted()
	}

}

class HourFormatter : ValueFormatter() {

	override fun getFormattedValue(value: Float): String {
		return value.kmbFormatted() + "H"
	}

	override fun getAxisLabel(value: Float, axis: AxisBase?): String {
		val test = value.kmbFormatted() + "H"
		return test
	}

}

