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.

Try it:

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:

Name Type Description
settings Object Connector thumbs object with settings.

Returns:

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

Try it:

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:

Name Type Default Description
enabled boolean
false
Enabled state to set.

Returns:

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

Try it:

end

Getter for the end interval of the task.

Returns:

anychart.core.gantt.edit.SideControl - End edit control settings.

Try it:

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:

Name Type Description
settings Object Left side control object with settings.

Returns:

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

Try it:

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 or a string. Learn more about coloring.

Params:

Name Type Description
value anychart.graphics.vector.Fill Color as an object 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:

Name Type Default Description
color string
"none"
Color as a string.
opacity number
Color opacity.

Returns:

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

Try it:

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

Try it:

Radial gradient fill of all timeline elements preview while editing (tasks, grouping tasks, baselines, milestone, periods). 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.ElementEdit - Self instance for method chaining.

Try it:

Image fill of all timeline elements preview while editing (tasks, grouping tasks, baselines, milestone, periods). Learn more about coloring.

Params:

Name Type Description
imageSettings anychart.graphics.vector.Fill Object with settings.

Returns:

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

Try it:

start

Getter for the start interval of the task.

Returns:

anychart.core.gantt.edit.SideControl - Start edit control settings.

Try it:

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:

Name Type Description
settings Object Right side control object with settings.

Returns:

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

Try it:

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:

Name Type Description
value anychart.graphics.vector.Stroke | 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.ElementEdit - Self instance for method chaining.

Try it:

thumbs

Getter for common settings for thumbs while editing.

Returns:

anychart.core.gantt.edit.Thumb - Thumbs settings.

Try it:

Setter for common settings for thumbs while editing.
Thumbs are a rectangles on the tasks that allow editing the intervals of the tasks.

Params:

Name Type Description
settings Object Thumbs object with settings.

Returns:

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

Try it: