LiveCharts.AxisCore.Formatter C# (CSharp) Method

Formatter() private method

private Formatter ( double x ) : string
x double
return string
        private string Formatter(double x)
        {
            if (Labels == null)
            {
                return LabelFormatter == null
                    ? x.ToString(CultureInfo.InvariantCulture)
                    : LabelFormatter(x);
            }

            if (x < 0) x *= -1;
            return Labels.Count > x && x >= 0
                ? Labels[(int) x]
                : "";
        }