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 common.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 common.Legend
that is capable of hiding
series data,then this behavior must be added after the common.Legend
to
ensure that it calculates values after series have been potentially removed
from the list.
- Inheritance
-
- Object
- ChartBehavior<
D> - PercentInjector
- Annotations
Constructors
- PercentInjector({PercentInjectorTotalType totalType = common.PercentInjectorTotalType.domain})
- Constructs a PercentInjector.
Properties
-
desiredGestures
→ Set<
GestureType> -
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- 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
-
createCommonBehavior(
) → PercentInjector< D> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateCommonBehavior(
ChartBehavior commonBehavior) → void -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override