toChart method

  1. @override
double toChart(
  1. num? input
)
override

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;
  }
}