maxValueRoundingMap property

Map<num, num> maxValueRoundingMap
final

Rounding map of the maxValue.

Logic of rounding is following:

key is compared to maxValue.

If maxValue is less than key - value of this key is used as a complement to maxValue to find the closest value that will be divided by quantity of Y axis divisions to "buitify" Y axis labels.

Otherwise, next key is compared to maxValue. And so on.

In case of absence of key that might satisfy the rule, described above, last entry of this map will be used as a fallback.

Example:

  • yAxisDivisions = 2 (so 2 division lines results with 3 chunks of chart);
  • maxValue = 83 (from data).

So, based on these values maxValue will be rounded to 90.

Please note: it is preferred to provide ascending keys for this map, omitting this simple rule may cause malfunctioning of rounding function. As a sample of correctly formed map defaultMaxValueRoundingMap could be used.

Implementation

final Map<num, num> maxValueRoundingMap;