SideTitles constructor

const SideTitles({
  1. bool showTitles = false,
  2. GetTitleWidgetFunction getTitlesWidget = defaultGetTitle,
  3. double reservedSize = 22,
  4. double? interval,
})

It draws some title on an axis, per axis values, showTitles determines showing or hiding this side,

Texts are depend on the axis value, you can override getTitles, it gives you an axis value (double value) and a TitleMeta which contains additional information about the axis. Then you should return a Widget to show. It allows you to do anything you want, For example you can show icons instead of texts, because it accepts a Widget

reservedSize determines the maximum space that your titles need, (All titles will stretch using this value)

Texts are showing with provided interval. If you don't provide anything, we try to find a suitable value to set as interval under the hood.

Implementation

const SideTitles({
  this.showTitles = false,
  this.getTitlesWidget = defaultGetTitle,
  this.reservedSize = 22,
  this.interval,
}) : assert(interval != 0, "SideTitles.interval couldn't be zero");