SpiderChart constructor

SpiderChart({
  1. Key? key,
  2. required List<double> data,
  3. required List<Color> colors,
  4. required double maxValue,
  5. List<String> labels = const [],
  6. Size size = Size.infinite,
  7. int decimalPrecision = 0,
  8. double fallbackHeight = 200,
  9. double fallbackWidth = 200,
})

Creates a widget that displays a spider chart

Implementation

SpiderChart({
  super.key,
  required this.data,
  required this.colors,
  required this.maxValue,
  this.labels = const [],
  this.size = Size.infinite,
  this.decimalPrecision = 0,
  this.fallbackHeight = 200,
  this.fallbackWidth = 200,
})  : assert(data.length == colors.length,
          'Length of data and color lists must be equal'),
      assert(labels.isNotEmpty ? data.length == labels.length : true,
          'Length of data and labels lists must be equal');