multiLevelLabels property

List<NumericMultiLevelLabel>? multiLevelLabels
final

Provides the option to group the axis labels. You can customize the start, end value of a multi-level label, text, and level of the multi-level labels.

The start and end values for the category axis need to be string type, in the case of date-time or date-time category axes need to be date-time and in the case of numeric or logarithmic axes needs to be double.

Defaults to null.

Widget build(BuildContext context) {
  return Container(
    child: SfCartesianChart(
      primaryXAxis: NumericAxis(
        multiLevelLabels: const <NumericMultiLevelLabel>[
          NumericMultiLevelLabel(
            start: 0,
            end: 2,
            text: 'First'
          ),
          NumericMultiLevelLabel(
            start: 2,
            end: 4,
            text: 'Second'
          )
        ]
      )
    )
  );
}

Implementation

final List<NumericMultiLevelLabel>? multiLevelLabels;