AnyChart
API Reference
Still have questions?
Contact support
Top

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:

NameTypeDefaultDescription
enabledboolean
true
Enabled state to set.

Returns:

anychart.core.gantt.edit.Thumb - Self instance for method chaining.

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:

NameTypeDescription
coloranychart.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.

Params:

NameTypeDescription
colorstringColor as a string.
opacitynumberColor opacity.

Returns:

anychart.core.gantt.edit.Thumb - Self instance for method chaining.
Linear gradient fill. Learn more about coloring.

Params:

NameTypeDescription
keysArray.<(anychart.graphics.vector.GradientKey|string)>Gradient keys.
anglenumberGradient angle.
modeboolean | anychart.graphics.vector.Rect | ObjectGradient mode.
opacitynumberGradient opacity.

Returns:

anychart.core.gantt.edit.Thumb - Self instance for method chaining.
Radial gradient fill. Learn more about coloring.

Params:

NameTypeDescription
keysArray.<(anychart.graphics.vector.GradientKey|string)>Color-stop gradient keys.
cxnumberX ratio of center radial gradient.
cynumberY ratio of center radial gradient.
modeanychart.graphics.math.RectIf defined then userSpaceOnUse mode, else objectBoundingBox.
opacitynumberOpacity of the gradient.
fxnumberX ratio of focal point.
fynumberY ratio of focal point.

Returns:

anychart.core.gantt.edit.Thumb - Self instance for method chaining.
Image thumb fill. Learn more about coloring.

Params:

NameTypeDescription
imageSettingsanychart.graphics.vector.FillObject with settings.

Returns:

anychart.core.gantt.edit.Thumb - Self instance for method chaining.

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:

NameTypeDescription
offsetnumberThe horizontal offset to set.

Returns:

anychart.core.gantt.edit.Thumb - Self instance for method chaining.

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:

NameTypeDefaultDescription
sizenumber
3 for thumbs, 10 for connector thumbs
Thumb size to set.

Returns:

anychart.core.gantt.edit.Thumb - Self instance for method chaining.

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:

NameTypeDescription
valueanychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | nullStroke settings.
thicknessnumberLine thickness.
dashpatternstringControls the pattern of dashes and gaps used to stroke paths.
lineJoinstring | anychart.graphics.vector.StrokeLineJoinLine join style.
lineCapstring | anychart.graphics.vector.StrokeLineCapLine cap style.

Returns:

anychart.core.gantt.edit.Thumb - Self instance for method chaining.
Setter for the thumb stroke using an object.

Params:

NameTypeDescription
settingsObjectStroke settings from anychart.graphics.vector.Stroke.

Returns:

anychart.core.gantt.edit.Thumb - Self instance for method chaining.

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:

NameTypeDefaultDescription
typeanychart.enums.MarkerType | string
'circle'
The connector thumb type to set.

Returns:

anychart.core.gantt.edit.Thumb - Self instance for method chaining.

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:

NameTypeDescription
offsetnumberThe vertical offset to set.

Returns:

anychart.core.gantt.edit.Thumb - Self instance for method chaining.