ItemOptions class abstract
Options for chart items. You can use this subclasses: BarItemOptions, BubbleItemOptions, WidgetItemOptions
Required itemBuilder parameter is used to provide a data for each item on the chart.
Required geometryPainter specifies how to draw these items on the chart.
Extend this to make your custom options or painters if needed.
WidgetItemOptions is only ItemOptions that is not using geometryPainter and
instead is passing _EmptyGeometryPainter
as the painter, and defaulting all other values to 0.0.
- Implementers
Constructors
- ItemOptions({required ChartGeometryPainter geometryPainter, EdgeInsets padding = EdgeInsets.zero, EdgeInsets multiValuePadding = EdgeInsets.zero, double? maxBarWidth, double? minBarWidth, double startPosition = 0.5, required ItemBuilder itemBuilder})
-
Default constructor for ItemOptions
It's recommended to make/use custom item options for custom painters.
const
Properties
- geometryPainter → ChartGeometryPainter
-
Geometry
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- itemBuilder → ItemBuilder
-
final
- maxBarWidth → double?
-
Max width of item in the chart
final
- minBarWidth → double?
-
Min width of item in the chart
final
- multiValuePadding → EdgeInsets
-
Multi value chart padding, this will
group
values with same index from different lists use to make space between index changes in multi value charts Only used for multiple data lists when they are not stackedfinal - padding → EdgeInsets
-
Item padding, if minBarWidth and padding are more then available space
padding will get ignored
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startPosition → double
-
Set start position.
This value ranges from 0.0 - 1.0.
final
Methods
-
animateTo(
ItemOptions endValue, double t) → ItemOptions - Animate to next ItemOptions state When making custom ItemOptions make sure to override this return custom painter with all available options, otherwise changes in options won't be animated
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited