toChart method
Implementation
@override
double toChart(num? input) {
final offset = transfer(values.first);
final total = transfer(values.last) - offset;
final start = crossAxisPosition + _marginStart;
switch (direction) {
case Axis.horizontal:
return box!.left +
start +
(box!.width - start - _marginEnd) *
(transfer(input!) - offset) /
total;
case Axis.vertical:
return box!.bottom +
start +
(box!.height - start - _marginEnd) *
(transfer(input!) - offset) /
total;
}
}