LineChartData class
Data for the LineChart.
Constructors
-
LineChartData({required Map<
DateTime, double> data, double? predefinedMaxValue, Map<num, num> maxValueRoundingMap = defaultMaxValueRoundingMap, double? limit, String? limitText, TooltipBuilder<double> titleBuilder = defaultTitleBuilder, TooltipBuilder<double> subtitleBuilder = defaultSubtitleBuilder, RichLabelBuilder<DateTime> xAxisLabelBuilder = defaultXAxisLabelBuilder, LabelBuilder<double> yAxisLabelBuilder = defaultYAxisLabelBuilder, 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 setter
-
data
→ Map<
DateTime, double> -
Map of the values that corresponds to the dates.
final
- 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 setteroverride
- hasNegativeMinValue → bool
-
Whether minValue is less than
0
.no setter - 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.
final
- minValue → double
-
Determines min value for chart to draw.
no setter
- predefinedMaxValue → double?
-
Predefined max value for the chart.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
subtitleBuilder
→ TooltipBuilder<
double> -
Text builder for the tooltip subtitle.
final
-
titleBuilder
→ TooltipBuilder<
double> -
Text builder for the tooltip title.
final
- totalValue → double
-
Determines sum of the maxValue and absolute value of minValue.
no setter
-
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.
final
-
yAxisLabelBuilder
→ LabelBuilder<
double> -
Text builder for the Y axis label.
final
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.
-
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.
override
Static Methods
-
defaultSubtitleBuilder(
DateTime key, double value) → String -
defaultTitleBuilder(
DateTime key, double value) → String -
defaultXAxisLabelBuilder(
DateTime key, TextStyle style) → TextSpan -
defaultYAxisLabelBuilder(
double value) → String
Constants
-
defaultMaxValueRoundingMap
→ const Map<
num, num>