class anychart.core.graph.elements.Group Improve this Doc
Graph chart group class.
Methods Overview
| Appearance | |
| fill() | Fill for nodes of current group. |
| shape() | Shape for nodes of current group. |
| stroke() | Stroke for nodes of current group. |
| Point Elements | |
| labels() | Labels for nodes of current group. |
| Size | |
| height() | Height for nodes of current group. |
| width() | Width for nodes of current group. |
| State settings | |
| hovered() | Hovered state settings. |
| normal() | Normal state settings. |
| selected() | Selected state settings. |
Methods Description
fill
Setter for fill.
Detailed description
Note: you can use all available anychart fill methods such as function, string and object.
Params:
| Name | Type | Description |
|---|---|---|
| color | anychart.graphics.vector.Fill | string | Fill object or string color |
Returns:
anychart.core.graph.elements.Group - Self instance for method chaining.Try it:
Setter for function fill.
Params:
| Name | Type | Description |
|---|---|---|
| Function | function | Function for color resolve. |
Returns:
anychart.core.graph.elements.Group - Self instance for method chaining.Try it:
height
Setter for height
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| value | number | 12 | Height for the nodes of the group. |
Returns:
anychart.core.graph.elements.Group - Group instance.Try it:
hovered
Getter for hovered state settings.
Detailed description
For hovered state you must use methods defined at anychart.core.graph.elements.Group class
Returns:
anychart.core.StateSettings - Hovered state settings See listing
var group1 = chart.group('group1');
var groupHoveredState = group1.hovered()
groupNormalState.stroke('blue', 2, '3 1') //Set stroke for all nodes of this group that has hovered state.Try it:
Setter for hovered state settings.
Detailed description
For selected state you must use methods defined at anychart.core.graph.elements.Group class
Params:
| Name | Type | Description |
|---|---|---|
| settings | Object | State settings to set. |
Returns:
anychart.core.graph.elements.Group - Self instance for method chaining.Try it:
labels
Getter for labels.
Detailed description
It is used to access to the current (default too) settings of the labels.
Returns:
anychart.core.ui.LabelsFactory - LabelsSettings instance.Try it:
Setter for labels.
Params:
| Name | Type | Description |
|---|---|---|
| config | object | Settings object for labels |
Returns:
anychart.core.graph.elements.Group - Group instance.Try it:
normal
Getter for normal state settings.
Detailed description
For normal state you must use methods defined at anychart.core.graph.elements.Group class
Returns:
anychart.core.StateSettings - Normal state settings. See listing
var group1 = chart.group('group1');
var groupNormalState = group1.normal()
groupNormalState.shape('square') //Set shape for all nodes of this group that has normal state.Try it:
Setter for normal state settings.
Params:
| Name | Type | Description |
|---|---|---|
| settings | Object | State settings to set. |
Returns:
anychart.core.graph.elements.Group - Self instance for method chaining.Try it:
selected
Getter for selected state settings.
Returns:
anychart.core.StateSettings - Selected state settings See listing
var group1 = chart.group('group1');
var groupHoveredState = group1.selected();
var labels = groupNormalState.labels();
labels.enabled(true);
labels.format('Selected node {%id}');Try it:
Setter for selected state settings.
Params:
| Name | Type | Description |
|---|---|---|
| settings | Object | State settings to set. |
Returns:
anychart.core.graph.elements.Group - Self instance for method chaining.Try it:
shape
Setter for shape.
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| value | anychart.enums.MarkerType | string | 'circle' | Value to set. |
Returns:
anychart.core.graph.elements.Group - Group instance.Try it:
stroke
Setter for stroke.
Params:
| Name | Type | Description |
|---|---|---|
| function | function | Function for color resolve. |
Returns:
anychart.core.graph.elements.Group - Self instance for method chaining.Try it:
Setter for function stroke.
Params:
| Name | Type | Description |
|---|---|---|
| color | anychart.graphics.vector.Fill | String or object |
Returns:
anychart.core.graph.elements.Group - Self instance for method chaining.Try it:
Setter for the graph elements slices stroke.
Learn more about stroke settings.
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| color | anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | null | 'none' | Stroke settings. |
| thickness | number | 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.graph.elements.Group - Self instance for method chaining.Try it:
width
Setter for width.
Detailed description
Note: width method works only for 'rectangle' node shape. Width of other shape types you can change via height method.
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| value | number | 12 | Width of the group. |
Returns:
anychart.core.graph.elements.Group - Group instance.Try it:
