flutter_charts library

Classes

AdjustableLabels
A marker of container with adjustable contents, such as labels that can be skipped.
AdjustableLabelsChartAreaContainer
Provides ability to connect LabelLayoutStrategy to Container, (actually currently the ChartAreaContainer.
AxisLabelContainer
Subclass of LabelContainer is extended with member parentOffsetTick, which maintains the container's center position in immediate parent's coordinates.
ChartAreaContainer
Base class which manages, lays out, moves, and paints each top level block on the chart. The basic top level chart blocks are:
ChartData
Manages Chart Data.
ChartOptions
Options for chart allow to configure certain sizes, colors, and layout.
ChartTopContainer
Abstract class representing the Container of the whole chart.
DataContainer
Manages the core chart area which displays and paints (in this order):
DataContainerOptions
DefaultIterativeLabelLayoutStrategy
Strategy of achieving that labels do not overlap ("fit") on an axis.
GridLinesContainer
Interval
IterativeLayoutOptions
LabelCommonOptions
LabelContainer
Container of one label anywhere on the chart, in Labels, Axis, Titles, etc.
LabelInfo
The LabelInfo is a holder for one label, it's numeric value and the displayed label.
LabelLayoutStrategy
Base class for layout strategies.
LabelStyle
Class for value objects which group the text styles that may affect LabelContainer's instances layout.
LegendContainer
Lays out the legend area for the chart.
LegendItemContainer
Represents one layed out item of the legend: The rectangle for the color indicator, _indicatorRect, followed by the series label text.
LegendOptions
LineChart
Provides paint for the line chart.
LineChartDataContainer
Provides the data area container for the line chart.
LineChartOptions
LineChartPainter
This concrete CustomPainter only provides a constructor, specifically requiring line_containers.LineChartTopContainer, and setting line_containers.LineChartContainer.isStacked to false, as lines can never be stacked.
LineChartTopContainer
Container of the line chart.
PointsColumn
Represents a column of StackableValuePoints, with support for both stacked and non-stacked charts.
PointsColumns
A list of PointsColumn instances, created from user data rows ChartData.dataRows.
Poly
A minimal polynomial needed for Y label and axis scaling.
RandomChartData
Generator of sample data for testing the charts.
StackableValuePoint
Represents one Y numeric value in the ChartData.dataRows, with added information about the X coordinate (display coordinate).
VerticalBarChart
Provides paint for the vertical bar chart.
VerticalBarChartDataContainer
Provides the data area container for the bar chart.
VerticalBarChartOptions
The options specific for the VerticalBarChart.
VerticalBarChartPainter
This concrete CustomPainter only provides a constructor, specifically requiring bar_containers.VerticalBarChartTopContainer, and setting verticalBarChartContainer.isStacked to true, as bars are stacked by default.
VerticalBarChartTopContainer
Container of the vertical bar chart.
XContainer
Container of the X axis labels.
XContainerOptions
YContainer
Container of the Y axis labels.
YContainerOptions
YLabelsCreatorAndPositioner
Creates, scales, and formats the Y labels, from the transformed data to their positions and formatted strings on the Y axis.

Mixins

ChartBehavior
The behavior mixin allows to plug in to the ChartTopContainer a behavior that is specific for a line chart or vertical bar chart.

Properties

epsilon double
no setter

Functions

bothHaveValue({required double one, required double two, required double value}) bool
Returns true if both of the passed values one, two hase the passed value, false otherwise.
dataRowsDefaultColors(int dataRowsCount) List<Color>
Sets up colors for legends, first several explicitly, rest randomly.
enumName(Enum e) String
exactlyOneHasValue({required double one, required double two, required double value}) bool
Returns true if exactly one of the passed values one, two hase the passed value, false otherwise.
identity<T>(T y) → T
Identity transform.
inverseLog10(num y) num
Reverse of 10-based logarithm.
log10(num y) num
10-based logarithm.
randomDataRowsLegends(int dataRowsCount) List<String>
Sets up legends names, first several explicitly, rest randomly.
randomDataXLabels(int numXLabels) List<String>
Generate list of "random" xUserLabels as monthNames or weekday names.
randomDataYLabels(bool useUserProvidedYLabels) List<String>?
randomDataYs(int numXLabels, int _numDataRows, bool _overlapDataYs) List<List<double>>
scaleValue({required double value, required double fromDomainMin, required double fromDomainMax, required double toDomainMin, required double toDomainMax}) double
Scale the value that must be from the scale given by fromDomainMin - fromDomainMax to the "to scale" given by toDomainMin - toDomainMax.
transpose(List<List<StackableValuePoint>> colsInRows) List<List<StackableValuePoint>>
Assuming even length 2D matrix colsRows, return it's transpose copy.