SpiderChartUpdated constructor

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

Creates a widget that displays a spider chart

Implementation

SpiderChartUpdated({
  Key? key,
  required this.data,
  this.colors = const [],
  this.maxValue,
  this.labels = const [],
  this.size = Size.infinite,
  this.decimalPrecision = 0,
  this.fallbackHeight = 200,
  this.fallbackWidth = 200,
  this.colorSwatch,
  this.lineColor,
})  : assert(labels.isNotEmpty ? data.length == labels.length : true,
          'Length of data and labels lists must be equal'),
      assert(colors.isNotEmpty ? colors.length == data.length : true,
          "Custom colors length and data length must be equal"),
      assert(colorSwatch != null ? data.length < 10 : true,
          "For large data sets (>10 data points), please define custom colors using the [colors] parameter"),
      super(key: key);