BarRenderer<D> class

Renders series data as a series of bars.

Inheritance
Implemented types

Constructors

BarRenderer({BarRendererConfig<D>? config, String? rendererId})
factory
BarRenderer.internal({required BarRendererConfig<Object?> config, required String rendererId})
This constructor is protected because it is used by child classes, which cannot call the factory in their own constructors.

Properties

barRendererDecorator → BarRendererDecorator<Object?>?
final
chart CartesianChart<D>
getter/setter pairinherited
componentBounds Rectangle<int>?
Bounding box for drawing this component.
no setterinherited
config → BaseBarRendererConfig<Object?>
finalinherited
cornerStrategy CornerStrategy
no setter
drawBounds Rectangle<int>?
no setterinherited
graphicsFactory GraphicsFactory?
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
isRtl bool
no setterinherited
isSeriesRenderer bool
Whether or not this component is a series renderer that draws series data.
no setterinherited
layoutConfig → LayoutViewConfig
Layout params for this component.
finalinherited
rendererId String
Unique identifier for this renderer. Any Series on a chart with a matching rendererIdKey will be drawn by this renderer.
getter/setter pairinherited
renderingVertically bool
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
symbolRenderer ↔ SymbolRenderer?
Symbol renderer for this renderer.
getter/setter pairinherited

Methods

addMeasureValuesFor(MutableSeries<D> series, Axis<num> measureAxis, int startIndex, int endIndex) → void
inherited
addPositionToDetailsForSeriesDatum(DatumDetails<D> details, SeriesDatum<D> seriesDatum) → DatumDetails<D>
Adds chart position data to details.
override
assignMissingColors(Iterable<MutableSeries<D>> seriesList, {required bool emptyCategoryUsesSinglePalette}) → void
Assigns colors to series that are missing their colorFn.
inherited
configureDomainAxes(List<MutableSeries<D>> seriesList) → void
Adds the domain values for the given series to the chart's domain axis.
inherited
configureMeasureAxes(List<MutableSeries<D>> seriesList) → void
Adds the measure values for the given series to the chart's measure axes.
inherited
configureSeries(List<MutableSeries<D>> seriesList) → void
Performs basic configuration for the series, before it is pre-processed.
findNearestViewportEnd(Axis<D> domainAxis, AccessorFn<D> domainFn, List<Object?> data) int
inherited
findNearestViewportStart(Axis<D> domainAxis, AccessorFn<D> domainFn, List<Object?> data) int
inherited
getBaseDetails(dynamic datum, int index) → BarRendererElement<D>
Construct a base details element for a given datum.
getBoundsForBar(BarRendererElement<D> bar) Rectangle<int>?
getDetailsForSeriesDatum(SeriesDatum<D> seriesDatum) → DatumDetails<D>
Get an expanded set of processed DatumDetails for a given SeriesDatum.
inherited
getNearestDatumDetailPerSeries(Point<double> chartPoint, bool byDomain, Rectangle<int>? boundsOverride, {bool selectOverlappingPoints = false, bool selectExactEventLocation = false}) List<DatumDetails<D>>
Gets a list of the data from each series that is closest to a given point.
inherited
getOrderedSeriesList<S extends ImmutableSeries<D>>(List<S> seriesList) Iterable<S>
Gets the iterator for the series based grouped/stacked and orientation.
inherited
isPointWithinBounds(Point<double> chartPoint, Rectangle<int>? bounds) bool
Returns true of chartPoint is within the component bounds for this renderer.
inherited
layout(Rectangle<int> componentBounds, Rectangle<int> drawAreaBounds) → void
Layout this component.
inherited
makeAnimatedBar({required String key, required ImmutableSeries<D> series, List<int>? dashPattern, dynamic datum, Color? color, required BarRendererElement<D> details, D? domainValue, required ImmutableAxis<D> domainAxis, required int domainWidth, num? measureValue, required num measureOffsetValue, required ImmutableAxis<num> measureAxis, double? measureAxisPosition, Color? fillColor, FillPatternType? fillPattern, double? strokeWidthPx, required int barGroupIndex, double? previousBarGroupWeight, double? barGroupWeight, List<double>? allBarGroupWeights, required int numBarGroups, bool? measureIsNull, bool? measureIsNegative}) → AnimatedBar<D>
Generates an AnimatedBar to represent the previous and current state of one bar on the chart.
makeBarRendererElement({Color? color, List<int>? dashPattern, required BarRendererElement<D> details, D? domainValue, required ImmutableAxis<D> domainAxis, required int domainWidth, num? measureValue, required num measureOffsetValue, required ImmutableAxis<num> measureAxis, double? measureAxisPosition, Color? fillColor, FillPatternType? fillPattern, double? strokeWidthPx, required int barGroupIndex, double? previousBarGroupWeight, double? barGroupWeight, List<double>? allBarGroupWeights, required int numBarGroups, bool? measureIsNull, bool? measureIsNegative}) → BarRendererElement<D>
Generates a BarRendererElement to represent the rendering data for one bar on the chart.
measure(int maxWidth, int maxHeight) → ViewMeasuredSizes?
Measure and return the size of this component.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAttach(BaseChart<D> chart) → void
Handles any setup of the renderer that needs to be deferred until it is attached to a chart.
inherited
onDetach(BaseChart<D> chart) → void
Handles any clean-up of the renderer that needs to be performed when it is detached from a chart.
inherited
paint(ChartCanvas canvas, double animationPercent) → void
Paints the current bar data on the canvas.
inherited
paintBar(ChartCanvas canvas, double animationPercent, Iterable<BarRendererElement<D>> barElements) → void
Paints a stack of bar elements on the canvas.
preprocessSeries(List<MutableSeries<D>> seriesList) → void
Pre-calculates some details for the series that will be needed later during the drawing phase.
inherited
toString() String
A string representation of this object.
inherited
update(List<ImmutableSeries<D>> seriesList, bool isAnimatingThisDraw) → void
Generates rendering data needed to paint the data on the chart.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited