class anychart.core.resource.resourceList.TagsSettings Improve this Doc
Extends: anychart.core.resource.resourceList.TextSettings
Tags settings class.
Methods Overview
Base Text 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() | Font horizontal align settings. |
letterSpacing() | Letter spacing settings. |
lineHeight() | Line height settings. |
selectable() | Text selectable settings. |
textDirection() | Text direction settings. |
textIndent() | Text indent settings. |
textOverflow() | Text overflow settings. |
textWrap() | Text wrap settings. |
useHtml() | Text useHtml settings. |
vAlign() | Font vertical align settings. |
Coloring | |
background() | Background settings. |
Size and Position | |
margin() | Margin settings. |
padding() | Padding settings. |
Methods Description
background
Returns:
anychart.core.ui.Background - Background instance.- null/boolean - disable or enable background.
- object - sets background settings.
- string - sets background color.
Params:
Name | Type | Description |
---|---|---|
value | string | Object | null | boolean | Background settings. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.fontColor
Returns:
string - Text font color.var currentNames = currentResourceList.names(); var color = currentNames.fontColor();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | string | "#000" | Font color. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
fontDecoration
Returns:
anychart.graphics.vector.Text.Decoration | string - The font decoration.var currentNames = currentResourceList.names(); var decoration = currentNames.fontDecoration();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Text.Decoration | string | "none" | Font decoration |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
fontFamily
Returns:
string - Text font family.var currentNames = currentResourceList.names(); var font = currentNames.fontFamily();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | string | "Helvetica Neue","Helvetica",sans-serif | Font family. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
fontOpacity
Returns:
number - Text font opacity.var currentNames = currentResourceList.names(); var opacity = currentNames.fontOpacity();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | number | 1 | Font opacity. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
fontSize
Returns:
string | number - Text font size.var currentNames = currentResourceList.names(); var size = currentNames.fontSize();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | string | number | 17 | Font size. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
fontStyle
Returns:
anychart.graphics.vector.Text.FontStyle | string - Text font style.var currentNames = currentResourceList.names(); var style = currentNames.fontStyle();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Text.FontStyle | string | "normal" | Font style. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
fontVariant
Returns:
anychart.graphics.vector.Text.FontVariant | string - The font variant.var currentNames = currentResourceList.names(); var variant = currentNames.fontVariant();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Text.FontVariant | string | "normal" | Font variant. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
fontWeight
Returns:
string | number - The font weight.var currentNames = currentResourceList.names(); var weight = currentNames.fontWeight();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | string | number | "bold" | Font weight. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
hAlign
Returns:
anychart.graphics.vector.Text.HAlign | string - Font horizontal align.var currentNames = currentResourceList.names(); var currentHAlign = currentNames.hAlign();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Text.HAlign | string | "start" | Value to set. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
letterSpacing
Returns:
string | number - The letter spacing.var currentNames = currentResourceList.names(); var currentLetterSpacing = currentNames.letterSpacing();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | string | number | "normal" | Value to set. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
lineHeight
Returns:
string | number - Line height.var currentNames = currentResourceList.names(); var currentLineHeight = currentNames.lineHeight();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | string | number | "normal" | Value to set. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
margin
Params:
Name | Type | Description |
---|---|---|
value | Array.<(number|string)> | Object | Value to set. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
value1 | string | number | Top or top-bottom space. |
value2 | string | number | Right or right-left space. |
value3 | string | number | Bottom space. |
value4 | string | number | Left space. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
padding
Params:
Name | Type | Description |
---|---|---|
value | Array.<(number|string)> | Object | Value to set. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
value1 | string | number | Top or top-bottom space. |
value2 | string | number | Right or right-left space. |
value3 | string | number | Bottom space. |
value4 | string | number | Left space. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.// 1) top and bottom 10px, left and right 15px tags.padding(10, '15px'); // 2) top 10px, left and right 15px, bottom 5px tags.padding(10, '15px', 5); // 3) top 10px, right 15px, bottom 5px, left 12px tags.padding(10, '15px', '5px', 12);
Try it:
selectable
Returns:
boolean - The text selectable option.var currentNames = currentResourceList.names(); var currentSelectable = currentNames.selectable();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | boolean | false | Value to set. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
textDirection
Returns:
anychart.graphics.vector.Text.Direction | string - Text direction.var currentNames = currentResourceList.names(); var direction = currentNames.textDirection();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Text.Direction | string | "ltr" | Value to set |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
textIndent
Returns:
number - Text indent.var currentNames = currentResourceList.names(); var currentTextIndent = currentNames.textIndent();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | number | 0 | Value to set. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
textOverflow
Returns:
anychart.graphics.vector.Text.TextOverflow | string - Text overflow settings.var currentNames = currentResourceList.names(); var currentTextOverflow = currentNames.textOverflow();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Text.TextOverflow | string | "..." | Value to set. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
textWrap
Returns:
anychart.graphics.vector.Text.TextWrap | string - Text wrap settings.var currentNames = currentResourceList.names(); var currentTextWrap = currentNames.textWrap();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Text.TextWrap | string | "noWrap" | Value to set. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
useHtml
Returns:
boolean - UseHTML flag.var currentNames = currentResourceList.names(); var useHtmlFlag = currentNames.useHtml();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | boolean | false | Value to set. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
vAlign
Returns:
anychart.graphics.vector.Text.VAlign | string - Font vertical align.var currentNames = currentResourceList.names(); var currentVAlign = currentNames.vAlign();
Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Text.VAlign | string | "top" | Value to set. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it: