generateTicks method

List<AxisTick<T>> generateTicks()

Generates tick data from the scale.

Implementation

List<AxisTick<T>> generateTicks() {
  final values = tickValues ?? _getTicksFromScale();
  final format = tickFormat ?? _getDefaultFormat();

  return values.map((value) {
    final position = _getPosition(value);
    final label = format(value);
    return AxisTick<T>(
      value: value,
      position: position,
      label: label,
    );
  }).toList();
}