xLabel method

String xLabel(
  1. int index, [
  2. String? format
])

Implementation

String xLabel(int index, [String? format]) {
  if (index < 0) return '';
  final time = _time(index);
  if (time == null) return index < count ? rows[index][spec.x.label]?.toString() ?? '' : '';
  final pattern = format ?? spec.x.format;
  return (_formats[pattern] ??= DateFormat(pattern)).format(time);
}