niceTicks function
Adjusts ticks for nice round values.
Implementation
List<double> niceTicks(double start, double stop, int count) {
final step = tickStep(start, stop, count);
if (step > 0) {
start = (start / step).floor() * step;
stop = (stop / step).ceil() * step;
} else if (step < 0) {
start = (start * step).ceil() / step;
stop = (stop * step).floor() / step;
}
return linearTicks(start, stop, count);
}