AnyChart
API Reference
Still have questions?
Contact support
Top

class anychart.core.gantt.edit.ElementEdit Improve this Doc

Extends: anychart.core.Base

Settings for editing of the timeline elements.

Methods Overview

Specific settings
connectorThumbs()Connector thumbs settings.
enabled()Disable or enable enabled state.
end()Start edit control settings.
start()Start edit control settings.
thumbs()Thumbs settings.
Coloring
fill()Fill settings of all timeline elements preview while editing.
stroke()Settings for editing control stroke.

Methods Description

connectorThumbs

Getter for common settings for connector thumbs while editing.

Returns:

anychart.core.gantt.edit.Thumb - Connector thumbs settings.
Setter for common settings for connector thumbs while editing.
The connector thumbs are a circles on the tasks that allow creating connectors from one task to another.

Params:

NameTypeDescription
settingsObjectConnector thumbs object with settings.

Returns:

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

enabled

Getter for the enabled state of the editing control.

Returns:

boolean - Enabled state.
Setter for the enabled state of the editing control.
This method allows to edit only the elements and doesn't allow editing of the structure.

Params:

NameTypeDefaultDescription
enabledboolean
false
Enabled state to set.

Returns:

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

end

Getter for the end interval of the task.

Returns:

anychart.core.gantt.edit.SideControl - End edit control settings.
Setter for the end interval of the task.
Settings for visual display of the right side control on the task. Works only for tasks with duration.

Params:

NameTypeDescription
settingsObjectLeft side control object with settings.

Returns:

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

fill

Getter for the fill of all timeline elements preview while editing (tasks, grouping tasks, baselines, milestone, periods).

Returns:

anychart.graphics.vector.Fill | string - Fill settings.
See listing
var elements = timeLine.elements();
var edit = elements.edit();
edit.enabled(true);
var fill = edit.fill();
Setter for fill of all timeline elements preview while editing (tasks, grouping tasks, baselines, milestone, periods) 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.ElementEdit - Self instance for method chaining.
Fill color of all timeline elements preview while editing (tasks, grouping tasks, baselines, milestone, periods) with opacity. Fill as a string or an object.

Params:

NameTypeDefaultDescription
colorstring
'none'
Color as a string.
opacitynumber
Color opacity (0 to 1).

Returns:

anychart.core.gantt.edit.ElementEdit - Self instance for method chaining.
Linear gradient fill of all timeline elements preview while editing (tasks, grouping tasks, baselines, milestone, periods). 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 (0 to 1).

Returns:

anychart.core.gantt.edit.ElementEdit - Self instance for method chaining.
Radial gradient fill of all timeline elements preview while editing (tasks, grouping tasks, baselines, milestone, periods). 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.ElementEdit - Self instance for method chaining.
Image fill of all timeline elements preview while editing (tasks, grouping tasks, baselines, milestone, periods). Learn more about coloring.

Params:

NameTypeDescription
imageSettingsanychart.graphics.vector.FillObject with settings.

Returns:

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

start

Getter for the start interval of the task.

Returns:

anychart.core.gantt.edit.SideControl - Start edit control settings.
Setter for the start interval of the task.
Settings for visual display of the left side control on the task. Works only for tasks with duration.

Params:

NameTypeDescription
settingsObjectRight side control object with settings.

Returns:

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

stroke

Getter for the editing control stroke.

Returns:

anychart.graphics.vector.Stroke | string - Editing control stroke.
See listing
var elements = timeLine.elements();
var edit = elements.edit();
edit.enabled(true);
var stroke = edit.stroke();
Setter for the editing control stroke. Learn more about stroke settings.

Params:

NameTypeDescription
coloranychart.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.ElementEdit - Self instance for method chaining.
Setter for the editing control stroke using an object.

Params:

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

Returns:

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

thumbs

Getter for common settings for thumbs while editing.

Returns:

anychart.core.gantt.edit.Thumb - Thumbs settings.
Setter for common settings for thumbs while editing.
Thumbs are a rectangles on the tasks that allow editing the intervals of the tasks.

Params:

NameTypeDescription
settingsObjectThumbs object with settings.

Returns:

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