LabelInfo class
The LabelInfo is a holder for one label, it's numeric value and the displayed label.
There are four values each LabelInfo manages:
- The
_rawDataValue
: The value of dependent (y) variable in data, given by theYLabelsCreatorAndPositioner._mergedLabelYsIntervalWithDataYsEnvelope
.- This value is not-scaled && not-transformed.
- This value is in the interval extended from the interval of minimum and maximum y in data to the interval of the displayed labels. The reason is the chart may show axis lines and labels beyond the strict interval between minimum and maximum y in data.
- This value is created in the generative constructor's LabelInfo
initializer list from the
transformedDataValue
.
- The
_dataValue
: The_rawDataValue
after transformation by the DataContainerOptions.yTransform function.- This value is not-scaled && transformed
- This value is same as
_rawDataValue
if the DataContainerOptions.yTransform is an identity (this is the default behavior). Seelib/chart/options.dart
. - This value is passed in the primary generative constructor LabelInfo.
- The
_axisValue
: Equals to the scaled && transformed dataValue, in other words
It is created as scaled_axisValue = parentYScaler.scaleY(value: transformedDataValue.toDouble());
_dataValue
, in the PointsColumns where the scaling is from the Y data and labels envelop to the Y axis envelop.- This value is transformed and scaled.
- This value is obtained as follows
_axisValue = parentYScaler.scaleY(value: transformedDataValue.toDouble()); // which does return scaleValue( value: value.toDouble(), fromDomainMin: mergedLabelYsIntervalWithDataYsEnvelop.min.toDouble(), fromDomainMax: mergedLabelYsIntervalWithDataYsEnvelop.max.toDouble(), toDomainMin: _axisYMin, toDomainMax: _axisYMax);
- The
_formattedLabel
: The formatted String-value of_rawDataValue
.
Note: The **scaled && not-transformed ** value is not maintained.
Note: Data displayed inside the chart use transformed data values, displayed labels show raw data values.
Constructors
- LabelInfo({required num dataValue, required YLabelsCreatorAndPositioner parentYScaler})
- Constructs from value at the label, using scaler which keeps dataRange and axisRange (min, max).
Properties
- axisValue → num
-
no setter
- formattedLabel → String
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited