PieChartItem constructor

PieChartItem(
  1. String label,
  2. num weight, {
  3. String? color,
})

Implementation

PieChartItem(this.label, num weight, {String? color})
    : _weight = weight,
      shortLabel = (label.length > maxLabelLength) ? '${label.substring(0, maxLabelLength - 2)}..' : label {
  this.color = color ?? ColorGenerator.nextColor();
}