class anychart.core.waterfall.Arrow Improve this Doc
Methods Overview
| Miscellaneous | |
| connector() | Connector settings. |
| from() | From settings. |
| label() | Label settings. |
| to() | To settings. |
Methods Description
connector
Connector setter.
Params:
| Name | Type | Description |
|---|---|---|
| settings | Object | Connector settings. |
Returns:
anychart.core.waterfall.Arrow - Self instance for method chaining.Try it:
Connector getter.
Returns:
anychart.core.waterfall.ArrowConnector - Arrow connector instance.from
Arrow from value setter.
Params:
| Name | Type | Description |
|---|---|---|
| value | string | Name of the point arrow goes out of. |
Returns:
anychart.core.waterfall.Arrow - Self instance for method chaining.Try it:
Arrow from value getter.
Returns:
string - From point name.label
Arrow labels setter.
Detailed description
Arrow label formatter (
These values can also be used as string tokens for labels formatting. Learn more about text formatting.
waterfall.getArrow(0).label().format()) can take a function with
the following context:
function(){
// Next stack is the one to which connector goes. Previous is the one out of which connector comes.
// Context:
// this.value - Sum of values in the next stack.
// this.absolute - Contribution percent of the sum of values in the next stack, relative to the absolute value of the previous stack.
// this.percent - Contribution percent of the sum of values in the next stack, relative to the sum of values of the previous stack.
return this.value; // Default format value.
}These values can also be used as string tokens for labels formatting. Learn more about text formatting.
waterfall.getArrow(0).label().format('Absolute: {%absolute}\nPercent: {%percent}')Params:
| Name | Type | Description |
|---|---|---|
| settings | Object | Labels settings. |
Returns:
anychart.core.waterfall.Arrow - Self instance for method chaining.to
Arrow to value setter.
Params:
| Name | Type | Description |
|---|---|---|
| value | string | Name of the point arrow goes to. |
Returns:
anychart.core.waterfall.Arrow - Self instance for method chaining.Try it:
Arrow to value getter.
Returns:
string - To point name.