DataLabelSettings constructor

const DataLabelSettings({
  1. ChartAlignment alignment = ChartAlignment.center,
  2. Color? color,
  3. TextStyle? textStyle,
  4. EdgeInsets margin = const EdgeInsets.fromLTRB(5, 5, 5, 5),
  5. double opacity = 1,
  6. ChartDataLabelAlignment labelAlignment = ChartDataLabelAlignment.auto,
  7. double borderRadius = 5,
  8. bool isVisible = false,
  9. int angle = 0,
  10. ChartWidgetBuilder? builder,
  11. bool useSeriesColor = false,
  12. Offset? offset,
  13. bool showCumulativeValues = false,
  14. bool showZeroValue = true,
  15. Color borderColor = Colors.transparent,
  16. double borderWidth = 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.alignment = ChartAlignment.center,
    this.color,
    this.textStyle,
    this.margin = const EdgeInsets.fromLTRB(5, 5, 5, 5),
    this.opacity = 1,
    this.labelAlignment = ChartDataLabelAlignment.auto,
    this.borderRadius = 5,
    this.isVisible = false,
    this.angle = 0,
    this.builder,
    this.useSeriesColor = false,
    this.offset,
    this.showCumulativeValues = false,
    this.showZeroValue = true,
    this.borderColor = Colors.transparent,
    this.borderWidth = 0,
    this.overflowMode = OverflowMode.none,
    this.labelIntersectAction = LabelIntersectAction.shift,
    this.connectorLineSettings = const ConnectorLineSettings(),
    this.labelPosition = ChartDataLabelPosition.inside});