class anychart.core.gantt.edit.Thumb Improve this Doc
Extends: anychart.core.Base
Thumb class for the interval thumbs and connector thumbs settings. Sets visual display (fill, stroke, size, type, vertical and horizontal offsets) of the thumbs.
Methods Overview
Specific settings | |
enabled() | Disable or enable enabled state. |
horizontalOffset() | Horizontal offset of the connector thumb. |
type() | Connector thumb type. |
verticalOffset() | Vertical offset of the connector thumb. |
Coloring | |
fill() | Thumb fill settings. |
stroke() | Thumb stroke settings. |
Size and Position | |
size() | Thumb size. |
Methods Description
enabled
Getter for the enabled state of the thumb.
Returns:
boolean - Enabled state.Setter for the enabled state of the thumb.
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Enabled state to set. |
Returns:
anychart.core.gantt.edit.Thumb - Self instance for method chaining.Try it:
fill
Getter for the thumb fill.
Returns:
anychart.graphics.vector.Fill - Thumb fill settings. See listing
var edit = elements.edit(); edit.enabled(true); var thumbs = edit.thumbs(); var fill = thumbs.fill();
Setter for thumb fill settings using an array, an object or a string.
Learn more about coloring.
Params:
Name | Type | Description |
---|---|---|
color | anychart.graphics.vector.Fill | Array.<(anychart.graphics.vector.GradientKey|string)> | Color as an object, an array or a string. |
Returns:
anychart.core.gantt.edit.Thumb - Self instance for method chaining.Fill color with opacity. Fill as a string or an object.
Detailed description
Note: If color is set as a string (e.g. 'red .5') it has a priority over opt_opacity, which
means: color set like this rect.fill('red 0.3', 0.7) will have 0.3 opacity.
Params:
Name | Type | Description |
---|---|---|
color | string | Color as a string. |
opacity | number | Color opacity. |
Returns:
anychart.core.gantt.edit.Thumb - Self instance for method chaining.Try it:
Linear gradient fill.
Learn more about coloring.
Params:
Name | Type | Description |
---|---|---|
keys | Array.<(anychart.graphics.vector.GradientKey|string)> | Gradient keys. |
angle | number | Gradient angle. |
mode | boolean | anychart.graphics.vector.Rect | Object | Gradient mode. |
opacity | number | Gradient opacity. |
Returns:
anychart.core.gantt.edit.Thumb - Self instance for method chaining.Try it:
Radial gradient fill.
Learn more about coloring.
Params:
Name | Type | Description |
---|---|---|
keys | Array.<(anychart.graphics.vector.GradientKey|string)> | Color-stop gradient keys. |
cx | number | X ratio of center radial gradient. |
cy | number | Y ratio of center radial gradient. |
mode | anychart.graphics.math.Rect | If defined then userSpaceOnUse mode, else objectBoundingBox. |
opacity | number | Opacity of the gradient. |
fx | number | X ratio of focal point. |
fy | number | Y ratio of focal point. |
Returns:
anychart.core.gantt.edit.Thumb - Self instance for method chaining.Try it:
Image thumb fill.
Learn more about coloring.
Params:
Name | Type | Description |
---|---|---|
imageSettings | anychart.graphics.vector.Fill | Object with settings. |
Returns:
anychart.core.gantt.edit.Thumb - Self instance for method chaining.Try it:
horizontalOffset
Getter for the horizontal offset of the connector thumb.
Returns:
number - The horizontal offset. See listing
var elements = timeline.elements(); var edit = elements.edit(); edit.enabled(true); var connectorThumbs = edit.connectorThumbs(); var horizontalOffset = connectorThumbs.horizontalOffset();
Setter for the horizontal offset of the connector thumb.
Params:
Name | Type | Description |
---|---|---|
offset | number | The horizontal offset to set. |
Returns:
anychart.core.gantt.edit.Thumb - Self instance for method chaining.Try it:
size
Getter for the thumb size.
Returns:
number - The thumb size. See listing
var elements = timeline.elements(); var edit = elements.edit(); edit.enabled(true); var thumbs = edit.thumbs(); var size = thumbs.size();
Setter for the thumb size.
Params:
Name | Type | Default | Description |
---|---|---|---|
size | number | 3 for thumbs, 10 for connector thumbs | Thumb size to set. |
Returns:
anychart.core.gantt.edit.Thumb - Self instance for method chaining.Try it:
stroke
Getter for the thumb stroke.
Returns:
anychart.graphics.vector.Stroke - Thumb stroke settings. See listing
var edit = elements.edit(); edit.enabled(true); var thumbs = edit.thumbs(); var stroke = thumbs.stroke();
Setter for the thumb stroke.
Learn more about stroke settings.
Params:
Name | Type | Description |
---|---|---|
value | anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | null | 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.gantt.edit.Thumb - Self instance for method chaining.Try it:
Setter for the thumb stroke using an object.
Params:
Name | Type | Description |
---|---|---|
settings | Object | Stroke settings from anychart.graphics.vector.Stroke. |
Returns:
anychart.core.gantt.edit.Thumb - Self instance for method chaining.Try it:
type
Getter for the connector thumb type.
Returns:
anychart.enums.MarkerType | string - The connector thumb type. See listing
var elements = timeline.elements(); var edit = elements.edit(); edit.enabled(true); var connectorThumbs = edit.connectorThumbs(); var type = connectorThumbs.type();
Setter for the connector thumb type.
Params:
Name | Type | Default | Description |
---|---|---|---|
type | anychart.enums.MarkerType | string | 'circle' | The connector thumb type to set. |
Returns:
anychart.core.gantt.edit.Thumb - Self instance for method chaining.Try it:
verticalOffset
Getter for the vertical offset of the connector thumb.
Returns:
number - The vertical offset. See listing
var elements = timeline.elements(); var edit = elements.edit(); edit.enabled(true); var connectorThumbs = edit.connectorThumbs(); var verticalOffset = connectorThumbs.verticalOffset();
Setter for the vertical offset of the connector thumb.
Params:
Name | Type | Description |
---|---|---|
offset | number | The vertical offset to set. |
Returns:
anychart.core.gantt.edit.Thumb - Self instance for method chaining.Try it: