AnyChart
API Reference
Still have questions?
Contact support
Top

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

Methods Description

adjustFontSize

Getter for the adjust font settings.

Returns:

Object - AdjustFontSize settings.
Setter for the adjust font settings.

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.
Example
label.adjustFontSize(false);
// the same
label.adjustFontSize(false, false);
// the same
label.adjustFontSize([false, false]);

Try it:

disablePointerEvents

Getter for the pointer events settings.

Returns:

boolean - The pointer events settings.
See listing
var disablePointerEvents = level.disablePointerEvents();
Setter for the pointer events settings.

Params:

Name Type Default Description
value boolean
false
Value to set.

Returns:

anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.
See listing
var level = header.level(0);
level.disablePointerEvents(true);

enabled

Getter for the level state.

Returns:

boolean - Level state.
See listing
var level = header.level(1);
var state = level.enabled();
Setter for the level enabled state.

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

Getter for the level fill.

Returns:

anychart.graphics.vector.Fill string - The level fill.
See listing
var fill = level.fill();
Setter for fill settings 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.TimeLineHeader.LevelWrapper - Self instance for method chaining.
Fill color with opacity.

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:

Linear gradient fill. 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.TimeLineHeader.LevelWrapper - Self instance for method chaining.

Try it:

Radial gradient fill. 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.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

Getter for font color settings.

Returns:

string - Font color settings.
See listing
var fontColor = level.fontColor();
Setter for font color settings.

Params:

Name Type Description
color string Value to set.

Returns:

anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.

Try it:

fontDecoration

Getter for the text font decoration.

Returns:

anychart.graphics.vector.Text.Decoration string - Font decoration.
See listing
var fontDecoration = level.fontDecoration();
Setter for the text font decoration.

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

Getter for the font family.

Returns:

string - Font family.
See listing
var fontDecoration = level.fontFamily();
Setter for font family.

Params:

Name Type Description
family string Value to set.

Returns:

anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.

Try it:

fontOpacity

Getter for the text font opacity.

Returns:

number - Font opacity.
See listing
var fontOpacity = level.fontOpacity();
Setter for the text font opacity.
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

Getter for font size settings.

Returns:

number - Font size settings.
See listing
var fontSize = level.fontSize();
Setter for font size settings.

Params:

Name Type Description
size number | string Value to set.

Returns:

anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.

Try it:

fontStyle

Getter for font style settings.

Returns:

anychart.graphics.vector.Text.FontStyle - Font style settings.
See listing
var fontStyle = level.fontStyle();
Setter for font style settings.

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

Getter for font variant settings.

Returns:

anychart.graphics.vector.Text.FontVariant - Font variant settings.
See listing
var fontVariant = level.fontVariant();
Setter for font variant settings.

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

Getter for font weight settings.

Returns:

string number - Font weight settings.
See listing
var fontWeight = level.fontWeight();
Setter for font weight settings.

Params:

Name Type Description
weight string | number Value to set.

Returns:

anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.

Try it:

format

Getter for the function content text.

Returns:

function string - Token or function to format text.
See listing
var level = timeLine.level();
var format = level.format();
Setter for the function content text.
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

Getter for text horizontal align settings.

Returns:

anychart.graphics.vector.Text.HAlign - Horizontal align settings.
See listing
var hAlign = level.hAlign();
Setter for the text horizontal align settings.

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:

letterSpacing

Getter for letter spacing settings.

Returns:

number - Letter spacing settings.
See listing
var letterSpacing = level.letterSpacing();
Setter for letter spacing settings.

Params:

Name Type Description
value number Value to set.

Returns:

anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.

Try it:

lineHeight

Getter for the text line height.

Returns:

string number - Text line height.
See listing
var lineHeight = level.lineHeight();

Params:

Name Type Description
value string | number Value to set.

Returns:

anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.

Try it:

maxFontSize

Getter for the font size for adjust text to.

Returns:

number - Maximum font size.
Setter for the font size for adjust text to.

Params:

Name Type Description
value number | string Value to set.

Returns:

anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.

Try it:

minFontSize

Getter for minimum font size settings for adjust text from.

Returns:

number - Minimum font size.
Setter for minimum font size settings for adjust text from.

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

Getter for the text selectable option.

Returns:

boolean - Text selectable option.
See listing
var selectable = level.selectable();
Setter for the text 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

Getter for the level stroke.

Returns:

anychart.graphics.vector.Stroke string - The connector preview stroke.
See listing
var stroke = level.stroke();
Setter for the level stroke.

Params:

Name Type Default Description
settings 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:

Setter for the level stroke using an object.

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

Getter for the text direction.

Returns:

anychart.graphics.vector.Text.Direction string - Text direction.
See listing
var textDirection = level.textDirection();
Setter for the text direction.

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

Getter for the text indent.

Returns:

number - Text indent.
See listing
var textIndent = level.textIndent();
Setter for the text indent.

Params:

Name Type Description
value number Value to set.

Returns:

anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.

Try it:

textOverflow

Getter for the text overflow settings.

Returns:

anychart.graphics.vector.Text.TextOverflow string - Text overflow settings.
See listing
var textOverflow = level.textOverflow();
Setter for the text overflow settings.

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.
See listing.
var level = header.level(0);
level.textOverflow("...");

useHtml

Getter for the useHTML flag.

Returns:

boolean - Value of useHTML flag.
See listing
var useHtml = level.useHtml();
Setter for the useHTML flag.

Params:

Name Type Default Description
value boolean
false
Value to set.

Returns:

anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.
See listing.
var level = header.level(0);
level.useHtml(true);

vAlign

Getter for the text vertical align.

Returns:

anychart.graphics.vector.Text.VAlign string - Text vertical align.
See listing
var vAlign = level.vAlign();
Setter for the text vertical align.

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

Getter for the word-break mode.

Returns:

anychart.enums.WordBreak string - Word-break mode.
See listing.
var wordBreak = level.wordBreak();
Setter for the word-break mode.

Params:

Name Type Description
value anychart.enums.WordBreak | string Value to set.

Returns:

anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.
See listing.
var level = header.level(0);
level.wordBreak("break-all");

wordWrap

Getter for the word-wrap mode.

Returns:

anychart.enums.WordWrap string - Word-wrap mode.
See listing.
var level = header.level(0);
var wordWrap = level.wordWrap();
Setter for the word-wrap mode.

Params:

Name Type Description
value anychart.enums.WordWrap | string Value to set.

Returns:

anychart.core.gantt.TimeLineHeader.LevelWrapper - Self instance for method chaining.
See listing.
var level = header.level(0);
level.wordWrap("break-all");