createTickProvider method

  1. @override
NumericTickProvider createTickProvider(
  1. ChartContext context
)
override

Implementation

@override
NumericTickProvider createTickProvider(ChartContext context) {
  final provider = NumericTickProvider();
  if (zeroBound != null) {
    provider.zeroBound = zeroBound!;
  }
  if (dataIsInWholeNumbers != null) {
    provider.dataIsInWholeNumbers = dataIsInWholeNumbers!;
  }

  if (desiredMinTickCount != null ||
      desiredMaxTickCount != null ||
      desiredTickCount != null) {
    provider.setTickCount(
      desiredMaxTickCount ?? desiredTickCount ?? 10,
      desiredMinTickCount ?? desiredTickCount ?? 2,
    );
  }
  return provider;
}