ChartTopContainer class abstract

Abstract class representing the Container of the whole chart.

Containers calculate coordinates of chart points used for painting grid, labels, chart points etc.

Creates a simple chart container and call all needed layout methods.

Notes:

  • ChartTopContainer and it's extensions, such as LineChartContainer and VerticalBarChartContainer are the only container which does not extend Container
  • Related to above point, the layout(num size) is unrelated to a same name method on Container.
Mixed in types
Implementers

Constructors

ChartTopContainer({required ChartData chartData, LabelLayoutStrategy? xContainerLabelLayoutStrategy})
Simple Legend+X+Y+Data Container for a flutter chart.

Properties

chartArea Size
chartArea is the chart area size of this container. In flutter_charts, this is guaranteed to be the same area on which the painter will paint. See the call to layout of this class. chartArea marked late, as there is virtually no practical situation it can be known before runtime; it is required, but not set at construction time.
getter/setter pair
data ChartData
getter/setter pair
dataContainer DataContainer
getter/setter pair
enableSkipOnDistressedSize bool
If size constraints imposed by parent are too tight, some internal calculations of sizes may lead to negative values, making painting of this container not possible.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
isDistressed bool
getter/setter pairinherited
isStacked bool
getter/setter pair
layoutSize Size
Implements Container.layoutSize. ChartTopContainer is the only one overriding layoutSize setter, to express the layoutSize is fixed chartArea
getter/setter pairinherited-setter
legendContainer LegendContainer
Base Areas of chart.
getter/setter pair
offset Offset
Current absolute offset, set by parent (and it's parent etc, to root).
getter/setter pairinherited
pointsColumns PointsColumns
Subclasses - aware members.
getter/setter pair
presenterCreator ↔ PresenterCreator
Abstract methods or subclasses-implemented getters
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
skipByParent bool
skipByParent instructs the parent container that this container should not be painted or layed out - as if it collapsed to zero size.
getter/setter pairinherited
startYAxisAtDataMinAllowed bool
Behavior allows to start Y axis at data minimum (rather than 0).
no setterinherited
tiltMatrix → Matrix2
Provides access to tiltMatrix for extension's paint methods.
no setterinherited
xContainer XContainer
getter/setter pair
xTickXs List<double>
X coordinates of x ticks (x tick - middle of column, also middle of label). Once XContainer.layout and YContainer.layout are complete, this list drives the layout of DataContainer.
no setter
yContainer YContainer
getter/setter pair
yLabelsCreator YLabelsCreatorAndPositioner
Scaler of data values to values on the Y axis.
getter/setter pair
yTickYs List<double>
Y coordinates of y ticks (y tick - scaled value of data, also middle of label). Once XContainer.layout and YContainer.layout are complete, this list drives the layout of DataContainer.
no setter

Methods

applyParentOffset(Offset offset) → void
Allow a parent container to move this Container after layout.
inherited
applyParentTiltMatrix(Matrix2 tiltMatrix) → void
Tilt may apply to the whole container. todo-2 unused? move to base class? similar to offset?
inherited
createDataContainer({required ChartTopContainer chartTopContainer}) DataContainer
Abstract method creates the DataContainer, for the particular chart type (line, bar).
layout(LayoutExpansion parentLayoutExpansion) → void
Implements Container.layout for the chart as a whole.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paint(Canvas canvas) → void
Implements abstract paint for the whole chart. Paints the chart on the passed canvas, limited to the size area.
setupPointsColumns() → void
Create member pointsColumns from data.dataRows.
toString() String
A string representation of this object.
inherited

Operators

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