LabelAnnotation constructor

const LabelAnnotation({
  1. Key? key,
  2. required dynamic xScale,
  3. required dynamic yScale,
  4. required dynamic xValue,
  5. required dynamic yValue,
  6. required String label,
  7. TextStyle? labelStyle,
  8. required double width,
  9. required double height,
  10. LabelAnnotationConfig config = const LabelAnnotationConfig(),
  11. LabelAnchor anchor = LabelAnchor.center,
  12. Offset offset = Offset.zero,
})

Creates a label annotation.

Implementation

const LabelAnnotation({
  super.key,
  required this.xScale,
  required this.yScale,
  required this.xValue,
  required this.yValue,
  required this.label,
  this.labelStyle,
  required this.width,
  required this.height,
  this.config = const LabelAnnotationConfig(),
  this.anchor = LabelAnchor.center,
  this.offset = Offset.zero,
});