RangeAnnotation<D> class
Chart behavior that annotates domain ranges with a solid fill color.
The annotations will be drawn underneath series data and chart axes.
This is typically used for line charts to call out sections of the data range.
Support labels.
- Implemented types
Constructors
-
RangeAnnotation(List<
AnnotationSegment< annotations, {Color? defaultColor, AnnotationLabelAnchor? defaultLabelAnchor, AnnotationLabelDirection? defaultLabelDirection, AnnotationLabelPosition? defaultLabelPosition, TextStyleSpec? defaultLabelStyleSpec, bool? extendAxis, int? labelPadding, double? defaultStrokeWidthPx, int? layoutPaintOrder})Object> >
Properties
-
annotations
→ List<
AnnotationSegment< Object> > -
List of annotations to render on the chart.
final
- defaultColor → Color
-
Default color for annotations.
final
- defaultLabelAnchor → AnnotationLabelAnchor
-
Configures where to anchor annotation label text.
final
- defaultLabelDirection → AnnotationLabelDirection
-
Direction of label text on the annotations.
final
- defaultLabelPosition → AnnotationLabelPosition
-
Configures where to place labels relative to the annotation.
final
- defaultLabelStyleSpec → TextStyleSpec
-
Configures the style of label text.
final
- defaultStrokeWidthPx → double
-
Configures the stroke width for line annotations.
final
- extendAxis → bool
-
Whether or not the range of the axis should be extended to include the
annotation start and end values.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- labelPadding → int
-
Space before and after label text.
final
- layoutPaintOrder → int
-
Configures the order in which the behavior should be painted.
This value should be relative to LayoutPaintViewOrder.rangeAnnotation.
(e.g. LayoutViewPaintOrder.rangeAnnotation + 1)
final
- role → String
-
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
attachTo(
BaseChart< D> chart) → void -
Injects the behavior into a chart.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeFrom(
BaseChart< D> chart) → void -
Removes the behavior from a chart.
override
-
shouldShowLabels(
AnnotationSegment< Object> annotation) → bool - Sub-classes can override this method to control label visibility.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited