class anychart.core.waterfall.Connectors Improve this Doc
Methods Overview
Coloring | |
stroke() | Stroke settings. |
Miscellaneous | |
labels() | Connectors labels getter. |
Methods Description
labels
Connectors labels getter.
Returns:
anychart.core.ui.LabelsFactory - Labels factory instance.Connectors labels setter.
Detailed description
Connectors labels support 'auto' mode from anychart.enums.Position. In this mode position is set above the connector if next stack contribution is positive and under the connector if negative.
Connectors labels formatter (
These values can also be used as string tokens for labels formatting. Learn more about text formatting.
Connectors labels formatter (
waterfall.connectors().labels().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.total - Contribution percent of the sum of values in the next stack, relative to the absolute value of the previous stack. // this.stack - Contribution percent of the sum of values in the next stack, relative to the sum of values of the previous stack. return this.stack; // Default format value. }
These values can also be used as string tokens for labels formatting. Learn more about text formatting.
waterfall.connectors().labels().format('Total: {%total}\nStack: {%stack}')
Params:
Name | Type | Description |
---|---|---|
settings | Object | Labels settings. |
Returns:
anychart.core.waterfall.Connectors - Self instance for method chaining.stroke
Setter for stroke settings.
Learn more about stroke settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
color | anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | null | Stroke settings. | |
thickness | number | 1 | Line thickness. |
dashpattern | string | Controls the pattern of dashes and gaps used to stroke paths. | |
lineJoin | string | anychart.graphics.vector.StrokeLineJoin | Line join style. | |
lineCap | string | anychart.graphics.vector.StrokeLineCap | Line cap style. |
Returns:
anychart.core.waterfall.Connectors - Self instance for method chaining.Try it:
Getter for stroke settings.
Detailed description
This method can be used as getter only if the value has been previously set.
Returns:
anychart.graphics.vector.Stroke - Stroke settings.Setter for connector stroke using an object. Learn more about connector stroke
Params:
Name | Type | Description |
---|---|---|
settings | Object | Stroke settings from anychart.graphics.vector.Stroke. |
Returns:
anychart.core.waterfall.Connectors - Self instance for method chaining.