LineChartData class

Data for the LineChart.

Constructors

LineChartData({required Map<DateTime, double> data, double? predefinedMaxValue, Map<num, num> maxValueRoundingMap = ChartData.defaultMaxValueRoundingMap, RichLabelBuilder<DateTime> xAxisLabelBuilder = GridAxisData.defaultXAxisLabelBuilder, LabelBuilder<double> yAxisLabelBuilder = GridAxisData.defaultYAxisLabelBuilder, TooltipBuilder<double>? titleBuilder, TooltipBuilder<double>? subtitleBuilder, double? limit, String? limitText, LineChartGridType gridType = LineChartGridType.monthly, LineChartDataType dataType = LineChartDataType.bidirectional})
Constructs an instance of LineChartData.
const

Properties

canDraw bool
Checks whether chart and point could be drawned or not.
no setterinherited
data Map<DateTime, double>
Map of the values that corresponds to the dates.
finalinherited
dataDirection LineChartDataDirection
Determines direction of the LineChartDataType.unidirectional data type.
no setter
dataType LineChartDataType
Data type of the line chart.
final
gridType LineChartGridType
Grid type of the line chart.
final
hashCode int
The hash code for this object.
no setter
hasNegativeMinValue bool
Whether minValue is less than 0.
no setterinherited
lastDivisionIndex int
Gets last division index.
no setter
limit double?
Optional limit, corresponds to the limit line on the chart. It is designed to be as a notifier of overuse.
final
limitOverused bool
Determines whether max value from data is greater than limit. If so - limit is overused. Otherwise - no.
no setter
limitText String?
Optional limit text that will be printed on the limit label if limit is set.
final
maxValue double
Determines max value for chart to draw.
no setter
maxValueRoundingMap Map<num, num>
Rounding map of the maxValue.
finalinherited
minValue double
Determines min value for chart to draw.
no setterinherited
predefinedMaxValue double?
Predefined max value for the chart.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subtitleBuilder TooltipBuilder<double>
Text builder for the tooltip subtitle.
finalinherited
titleBuilder TooltipBuilder<double>
Text builder for the tooltip title.
finalinherited
totalValue double
Determines sum of the maxValue and absolute value of minValue.
no setterinherited
typedData Map<DateTime, double>
Gets map that contains all days in the month as keys.
no setter
xAxisDates List<DateTime>
Gets list of DateTime that is used to build X axis labels.
no setter
xAxisDivisions int
Gets divisions of the X axis.
no setter
xAxisLabelBuilder RichLabelBuilder<DateTime>
Text builder for the X axis label.
finalinherited
yAxisLabelBuilder LabelBuilder<double>
Text builder for the Y axis label.
finalinherited

Methods

copyWith({bool allowNullPredefinedMaxValue = false, bool allowNullLimit = false, bool allowNullLimitText = false, Map<DateTime, double>? data, double? predefinedMaxValue, Map<num, num>? maxValueRoundingMap, double? limit, String? limitText, TooltipBuilder? titleBuilder, TooltipBuilder? subtitleBuilder, RichLabelBuilder<DateTime>? xAxisLabelBuilder, LabelBuilder<double>? yAxisLabelBuilder, LineChartGridType? gridType, LineChartDataType? dataType}) LineChartData
Creates a copy of the current object with new values specified in arguments.
maxValuePredicate(double value) double
Predicate that must be resolved with max value of the provided data type T.
minValuePredicate(double value) double
Predicate that must be resolved with min value of the provided data type T.
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.