getValueLabels method

List<String> getValueLabels(
  1. double minValue,
  2. double maxValue,
  3. double magnitude
)

Implementation

List<String> getValueLabels(double minValue, double maxValue, double magnitude) {
  List<String> ret = [];
  for (var i = 0; i < this.valueStepsCount; i++) {
    var valueStep = maxValue - (((maxValue - minValue) * i) / (this.valueStepsCount - 1));
    ret.add(valueStep.toStringAsFixed(max(0, (- ((log(magnitude) / ln10) - 1)).round())));
    //ret.add(valueStep.toFixed(Math.max(0, - (Math.log10(magnitude) - 1))));
  }
  return ret;
}