class anychart.core.gantt.TimeLineHeader.LevelWrapper Improve this Doc
Extends: anychart.core.Base
Single timeline header level.
Methods Overview
Specific settings | |
format() | Function to format content text. |
Coloring | |
fill() | Fill settings |
stroke() | Stroke settings |
Content Text Settings | |
adjustFontSize() | Adjusting settings. |
disablePointerEvents() | Pointer events settings. |
fontColor() | Font color settings. |
fontDecoration() | Font decoration settings. |
fontFamily() | Font family settings. |
fontOpacity() | Font opacity settings. |
fontSize() | Font size settings. |
fontStyle() | Font style settings. |
fontVariant() | Font variant settings. |
fontWeight() | Font weight settings. |
hAlign() | Text horizontal align settings. |
letterSpacing() | Text letter spacing settings. |
lineHeight() | Line height settings. |
maxFontSize() | Maximum font size setting. |
minFontSize() | Minimum font size settings. |
textDirection() | Text direction settings. |
textIndent() | Text indent settings. |
textOverflow() | Text overflow settings. |
textShadow() | Text shadow settings. |
useHtml() | Text useHtml settings. |
vAlign() | Text vertical align settings. |
wordBreak() | Word break mode. |
wordWrap() | Word-wrap mode. |
Interactivity | |
enabled() | Level state (enabled or disabled). |
selectable() | Text selectable option. |
Miscellaneous | |
height() | Getter for element height settings. |
Methods Description
adjustFontSize
- [false, false] - don't adjust (adjust is off )
- [true, false] - adjust width
- [false, true] - adjust height
- [true, true] - adjust the first suitable value.
Returns:
Object - AdjustFontSize settings.Note: anychart.core.gantt.TimeLineHeader.LevelWrapper#fontSize does not work when adjusting is enabled.
Params:
Name | Type | Default | Description |
---|---|---|---|
bothOrByWidth | Object | Array.<boolean> | boolean | {width: false, height: false} | If only one param is set, its value goes for another too (see source code). |
byHeight | boolean | Is font needs to be adjusted by height. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.label.adjustFontSize(false); // the same label.adjustFontSize(false, false); // the same label.adjustFontSize([false, false]);
Try it:
disablePointerEvents
Returns:
boolean - The pointer events settings.var disablePointerEvents = level.disablePointerEvents();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | boolean | false | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.var level = header.level(0); level.disablePointerEvents(true);
enabled
Returns:
boolean - Level state.var level = header.level(1); var state = level.enabled();
Params:
Name | Type | Default | Description |
---|---|---|---|
state | null | boolean | true | Value to set. |
Returns:
anychart.core.ui.LabelsFactory - Self instance for method chaining.Try it:
fill
Returns:
anychart.graphics.vector.Fill | string - The level fill.var fill = level.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.TimeLineHeader.LevelWrapper - Self instance for method chaining.Params:
Name | Type | Description |
---|---|---|
color | string | Color as a string. |
opacity | number | Color opacity. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - 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.TimeLineHeader.LevelWrapper - 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.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
imageSettings | anychart.graphics.vector.Fill | Object with settings. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
fontColor
Returns:
string - Font color settings.var fontColor = level.fontColor();
Params:
Name | Type | Description |
---|---|---|
color | string | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
fontDecoration
Returns:
anychart.graphics.vector.Text.Decoration | string - Font decoration.var fontDecoration = level.fontDecoration();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Text.Decoration | string | anychart.graphics.vector.Text.Decoration#NONE | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
fontFamily
Returns:
string - Font family.var fontDecoration = level.fontFamily();
Params:
Name | Type | Description |
---|---|---|
family | string | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
fontOpacity
Returns:
number - Font opacity.var fontOpacity = level.fontOpacity();
Double value from 0 to 1.
Params:
Name | Type | Description |
---|---|---|
opacity | number | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
fontSize
Returns:
number - Font size settings.var fontSize = level.fontSize();
Params:
Name | Type | Description |
---|---|---|
size | number | string | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
fontStyle
Returns:
anychart.graphics.vector.Text.FontStyle - Font style settings.var fontStyle = level.fontStyle();
Params:
Name | Type | Description |
---|---|---|
value | string | anychart.graphics.vector.Text.FontStyle | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
fontVariant
Returns:
anychart.graphics.vector.Text.FontVariant - Font variant settings.var fontVariant = level.fontVariant();
Params:
Name | Type | Description |
---|---|---|
value | string | anychart.graphics.vector.Text.FontVariant | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
fontWeight
Returns:
string | number - Font weight settings.var fontWeight = level.fontWeight();
Params:
Name | Type | Description |
---|---|---|
weight | string | number | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
format
Returns:
function | string - Token or function to format text.var level = timeLine.level(); var format = level.format();
Learn more about using the format() method.
Params:
Name | Type | Description |
---|---|---|
value | function | string | Function or string token to format content text. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
hAlign
Returns:
anychart.graphics.vector.Text.HAlign - Horizontal align settings.var hAlign = level.hAlign();
Params:
Name | Type | Description |
---|---|---|
value | string | anychart.graphics.vector.Text.HAlign | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
height
Returns:
number | string | undefined - Current height setting.Params:
Name | Type | Default | Description |
---|---|---|---|
height | number | string | null | null | Height settings for the element. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.letterSpacing
Returns:
number - Letter spacing settings.var letterSpacing = level.letterSpacing();
Params:
Name | Type | Description |
---|---|---|
value | number | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
lineHeight
Returns:
string | number - Text line height.var lineHeight = level.lineHeight();
https://www.w3schools.com/cssref/pr_text_letter-spacing.asp
Params:
Name | Type | Description |
---|---|---|
value | string | number | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
maxFontSize
Returns:
number - Maximum font size.Params:
Name | Type | Description |
---|---|---|
value | number | string | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
minFontSize
Returns:
number - Minimum font size.Params:
Name | Type | Default | Description |
---|---|---|---|
minFontSize | number | string | 0 | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
selectable
Returns:
boolean - Text selectable option.var selectable = level.selectable();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | boolean | false | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
stroke
Returns:
anychart.graphics.vector.Stroke | string - The connector preview stroke.var stroke = level.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 joint style. | |
lineCap | string | anychart.graphics.vector.StrokeLineCap | Line cap style. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
settings | Object | Stroke settings from anychart.graphics.vector.Stroke. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
textDirection
Returns:
anychart.graphics.vector.Text.Direction | string - Text direction.var textDirection = level.textDirection();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Text.Direction | string | "ltr" | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
textIndent
Returns:
number - Text indent.var textIndent = level.textIndent();
Params:
Name | Type | Description |
---|---|---|
value | number | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
textOverflow
Returns:
anychart.graphics.vector.Text.TextOverflow | string - Text overflow settings.var textOverflow = level.textOverflow();
Params:
Name | Type | Description |
---|---|---|
value | anychart.graphics.vector.Text.TextOverflow | string | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.var level = header.level(0); level.textOverflow("...");
textShadow
Returns:
string - String representation of text shadow.var textShadow = level.textShadow();
Params:
Name | Type | Default | Description |
---|---|---|---|
textShadow | anychart.graphics.vector.TextShadow | string | 'none' | Text shadow to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
useHtml
Returns:
boolean - Value of useHTML flag.var useHtml = level.useHtml();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | boolean | false | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.var level = header.level(0); level.useHtml(true);
vAlign
Returns:
anychart.graphics.vector.Text.VAlign | string - Text vertical align.var vAlign = level.vAlign();
Params:
Name | Type | Description |
---|---|---|
value | anychart.graphics.vector.Text.VAlign | string | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.Try it:
wordBreak
Returns:
anychart.enums.WordBreak | string - Word-break mode.var wordBreak = level.wordBreak();
Params:
Name | Type | Description |
---|---|---|
value | anychart.enums.WordBreak | string | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.var level = header.level(0); level.wordBreak('break-all');
wordWrap
Returns:
anychart.enums.WordWrap | string - Word-wrap mode.var level = header.level(0); var wordWrap = level.wordWrap();
Params:
Name | Type | Description |
---|---|---|
value | anychart.enums.WordWrap | string | Value to set. |
Returns:
anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.var level = header.level(0); level.wordWrap("break-all");