onGenerateLabels property

GenerateLabelsCallback? onGenerateLabels
final

Returns the visible labels on SfLinearGauge

Modify the actual labels. Generate your own labels based on needs, in order to be shown in the gauge.

This snippet shows how to set generate labels for axis in SfLinearGauge.


SfLinearGauge(
onGenerateLabels: () {
return <LinearAxisLabel>[
LinearAxisLabel(text: 'R', value: 0),
LinearAxisLabel(text: 'M', value: 10),
LinearAxisLabel(text: 'L', value: 20),
LinearAxisLabel(text: 'XL', value: 30),];
})

Implementation

final GenerateLabelsCallback? onGenerateLabels;