public string GetLabel(double value, int index, UIAxisType axisType = UIAxisType.Value) { switch (axisType) { case UIAxisType.Value: return(Formatter != null?Formatter?.Invoke(value, index) : value.ToString("F" + DecimalCount)); case UIAxisType.DateTime: DateTimeInt64 dt = new DateTimeInt64((long)value); return(Formatter != null?Formatter?.Invoke(dt, index) : (DateTimeFormat.IsNullOrEmpty() ? dt.ToString() : dt.ToString(DateTimeFormat))); case UIAxisType.Category: return(Formatter != null?Formatter?.Invoke(value, index) : value.ToString("F0")); } return(value.ToString("F2")); }
public UIAxis(UIAxisType axisType) { Type = axisType; }