Created by Philipp Jahoda on 20/09/15. Custom formatter interface that allows formatting of axis labels before they are being drawn.

Extend ValueFormatter instead

interface IAxisValueFormatter {
    getAxisLabel(value: any, axis: AxisBase): string;
}

Implemented by

Methods

Methods

  • Called when a value from an axis is to be formatted before being drawn. For performance reasons, avoid excessive calculations and memory allocations inside this method.

    Parameters

    • value: any

      the value to be formatted

    • axis: AxisBase

      the axis the value belongs to

    Returns string

    Extend ValueFormatter and use ValueFormatter#getAxisLabel(float, AxisBase)