PercentInjector<D> class
Chart behavior that can inject series or domain percentages into each datum.
totalType configures the type of total to be calculated.
The measure values of each datum will be replaced by the percent of the total measure value that each represents. The "raw" measure accessor function on MutableSeries can still be used to get the original values.
Note that the results for measureLowerBound and measureUpperBound are not currently well defined when converted into percentage values. This behavior will replace them as percents to prevent bad axis results, but no effort is made to bound them to within a "0 to 100%" data range.
Note that if the chart has a Legend that is capable of hiding series data, then this behavior must be added after the Legend to ensure that it calculates values after series have been potentially removed from the list.
- Implemented types
Constructors
- PercentInjector({PercentInjectorTotalType totalType = PercentInjectorTotalType.domain})
- Constructs a PercentInjector.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- role → String
-
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalType → PercentInjectorTotalType
-
The type of data total to be calculated.
final
Methods
-
attachTo(
BaseChart< D> chart) → void -
Injects the behavior into a chart.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeFrom(
BaseChart< D> chart) → void -
Removes the behavior from a chart.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited