class anychart.core.gantt.elements.BaselinesElement Improve this Doc
Extends: anychart.core.gantt.elements.TimelineElement
Baselines element settings.
Methods Overview
Specific settings | |
progress() | Baseline progress settings. |
Coloring | |
fill() | Fill elements settings. |
stroke() | Element stroke settings. |
Events | |
removeAllListeners() | Removes all listeners |
Interactivity | |
edit() | Live edit mode. |
normal() | Normal state settings. |
rendering() | Rendering settings. |
selected() | Selected state settings. |
tooltip() | Getter for the timeline baselines-element tooltip. |
Labels | |
labels() | Element labels settings. |
Markers | |
endMarker() | Getter for the end marker. |
startMarker() | Getter for the start marker. |
Size and Position | |
above() | Displaying of the baseline bar above an time bar. |
anchor() | Element anchor. |
height() | Element height. |
offset() | Element vertical offset. |
position() | Element position. |
Methods Description
above
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | false | Value to set. |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.Try it:
anchor
Returns:
string | anychart.enums.Anchor - Element anchor.var elements = timeLine.elements(); var anchor = elements.anchor();
Params:
Name | Type | Description |
---|---|---|
anchor | string | anychart.enums.Anchor | Value to set. |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.Try it:
edit
Returns:
anychart.core.gantt.edit.ElementEdit - Live edit settings.Try it:
- boolean - disable or enable live edit.
- object - sets live edit settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
settings | Object | boolean | false | Live edit settings to set. |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.endMarker
Params:
Name | Type | Description |
---|---|---|
config | Object | boolean | Marker config object or boolean value to enable/disable the marker. |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.Try it:
fill
Returns:
anychart.graphics.vector.Fill | string - Element fill.var elements = timeLine.elements(); var fill = elements.fill();
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.elements.BaselinesElement - Self instance for method chaining.Params:
Name | Type | Default | Description |
---|---|---|---|
fillFunction | function():anychart.graphics.vector.Fill | function() { return anychart.color.darken(this.sourceColor); } | Function that looks like: function(){ // this.sourceColor - Color with type anychart.graphics.vector.Fill (directly resolvable color). Type is anychart.graphics.vector.Fill, anychart.graphics.vector.PatternFill. The color is set from a theme or palette and is determined automatically for each colorized element. // this.item - the item of the visual element to which the coloring is applied. Type is anychart.data.Tree.DataItem or anychart.data.TreeView.DataItem // this.itemIndex - the linear index of the item. Type is number // this.period - the period for anychart#ganttResource. Type is object. A period object with the index this.periodIndex at the data point this.item, corresponding to the visual display element. // this.periodIndex - the index of the period for anychart#ganttResource. return fillValue; // type anychart.graphics.vector.Fill } |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
color | string | Color as a string. |
opacity | number | Color opacity. |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.Try it:
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.elements.BaselinesElement - Self instance for method chaining.Try it:
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.elements.BaselinesElement - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
imageSettings | anychart.graphics.vector.Fill | Object with settings. |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.Try it:
height
Returns:
string | number - Element height.var elements = timeLine.elements(); var height = elements.height();
Params:
Name | Type | Description |
---|---|---|
height | string | number | Value to set. |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.Try it:
labels
- null/boolean - disable or enable base labels.
- object - sets base labels settings.
Params:
Name | Type | Description |
---|---|---|
settings | Object | boolean | null | Labels settings. |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.normal
Returns:
anychart.core.StateSettings - Normal state settings.Try it:
Params:
Name | Type | Description |
---|---|---|
settings | Object | State settings to set. |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.Try it:
offset
Returns:
string | number - Element vertical offset.var elements = timeLine.elements(); var offset = elements.offset();
Params:
Name | Type | Description |
---|---|---|
offset | string | number | Value to set. |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.Try it:
position
Returns:
string | anychart.enums.Anchor - The element position.var elements = timeLine.elements(); var position = elements.position();
Params:
Name | Type | Description |
---|---|---|
position | string | anychart.enums.Anchor | Value to set. |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.Try it:
progress
Returns:
anychart.core.gantt.elements.BaselineProgressElement - Baseline progress element settings.Try it:
Params:
Name | Type | Description |
---|---|---|
settings | Object | Object with settings. |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.Try it:
removeAllListeners
Params:
Name | Type | Description |
---|---|---|
type | string | Type of event to remove, default is to remove all types. |
Returns:
number - Number of listeners removed.Try it:
rendering
Returns:
anychart.core.gantt.rendering.Settings - Rendering settings.Try it:
Params:
Name | Type | Description |
---|---|---|
settings | Object | Rendering settings from anychart.core.gantt.rendering.Settings. |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.Try it:
selected
Returns:
anychart.core.StateSettings - Selected state settingsTry it:
Params:
Name | Type | Description |
---|---|---|
settings | Object | State settings to set. |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.Try it:
startMarker
Returns:
anychart.core.gantt.elements.Marker - Start marker instance.Try it:
Params:
Name | Type | Description |
---|---|---|
config | Object | boolean | Marker config object or boolean value to enable/disable the marker. |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.Try it:
stroke
Returns:
anychart.graphics.vector.Stroke | string - Element stroke settings.var elements = timeLine.elements(); var stroke = elements.stroke();
Params:
Name | Type | Default | Description |
---|---|---|---|
color | anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | null | Stroke settings. | |
thickness | number | 1 | 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.elements.BaselinesElement - Self instance for method chaining.Try it:
Params:
Name | Type | Default | Description |
---|---|---|---|
strokeFunction | function():anychart.graphics.vector.Stroke|anychart.graphics.vector.ColoredFill | function() { } | Function that looks like: function(){ // this.sourceColor - Color with type anychart.graphics.vector.Stroke (directly resolvable color). Type is anychart.graphics.vector.Stroke. The color is set from a theme or palette and is determined automatically for each colorized element. // this.item - the item of the visual element to which the coloring is applied. Type is anychart.data.Tree.DataItem or anychart.data.TreeView.DataItem // this.itemIndex - the linear index of the item. Type is number // this.period - the period for anychart#ganttResource. Type is object. A period object with the index this.periodIndex at the data point this.item, corresponding to the visual display element. // this.periodIndex - the index of the period for anychart#ganttResource. return strokeValue; // type anychart.graphics.vector.Stroke } |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
settings | Object | Stroke settings from anychart.graphics.vector.Stroke. |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.Try it:
tooltip
NOTE: Tooltip of baselines-element also provides its format and title format to data grid's tooltip if it doesn't have own formats.
Returns:
anychart.core.ui.Tooltip - Tooltip settings.var tooltip = timeline.baselines().tooltip();
- null/boolean - disable or enable tooltip.
- object - sets tooltip settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | Object | boolean | null | true | Tooltip settings. |
Returns:
anychart.core.gantt.elements.BaselinesElement - Self instance for method chaining.