DataLabelSettings constructor

const DataLabelSettings({
  1. bool isVisible = false,
  2. ChartAlignment alignment = ChartAlignment.center,
  3. Color? color,
  4. TextStyle? textStyle,
  5. EdgeInsets margin = const EdgeInsets.all(5.0),
  6. double opacity = 1.0,
  7. ChartDataLabelAlignment labelAlignment = ChartDataLabelAlignment.auto,
  8. double borderRadius = 5.0,
  9. int angle = 0,
  10. ChartWidgetBuilder? builder,
  11. bool useSeriesColor = false,
  12. Offset offset = Offset.zero,
  13. bool showCumulativeValues = false,
  14. bool showZeroValue = true,
  15. Color borderColor = Colors.transparent,
  16. double borderWidth = 1.0,
  17. OverflowMode overflowMode = OverflowMode.none,
  18. LabelIntersectAction labelIntersectAction = LabelIntersectAction.shift,
  19. ConnectorLineSettings connectorLineSettings = const ConnectorLineSettings(),
  20. ChartDataLabelPosition labelPosition = ChartDataLabelPosition.inside,
})

Creating an argument constructor of DataLabelSettings class.

Implementation

const DataLabelSettings({
  this.isVisible = false,
  this.alignment = ChartAlignment.center,
  this.color,
  this.textStyle,
  this.margin = const EdgeInsets.all(5.0),
  this.opacity = 1.0,
  this.labelAlignment = ChartDataLabelAlignment.auto,
  this.borderRadius = 5.0,
  this.angle = 0,
  this.builder,
  this.useSeriesColor = false,
  this.offset = Offset.zero,
  this.showCumulativeValues = false,
  this.showZeroValue = true,
  this.borderColor = Colors.transparent,
  this.borderWidth = 1.0,
  this.overflowMode = OverflowMode.none,
  this.labelIntersectAction = LabelIntersectAction.shift,
  this.connectorLineSettings = const ConnectorLineSettings(),
  this.labelPosition = ChartDataLabelPosition.inside,
});