format method

  1. @override
List<String> format(
  1. List<D> tickValues,
  2. Map<D, String> cache, {
  3. num? stepSize,
})
override

Formats a list of tick values.

Implementation

@override
List<String> format(List<D> tickValues, Map<D, String> cache,
        {num? stepSize}) =>
    tickValues.map((value) {
      // Try to use the cached formats first.
      var formattedString = cache[value];
      if (formattedString == null) {
        formattedString = formatValue(value);
        cache[value] = formattedString;
      }
      return formattedString;
    }).toList();