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. |
useHtml() | Text useHtml settings. |
vAlign() | Font vertical align settings. |
wordBreak() | Word break mode. |
wordWrap() | Word-wrap mode. |
Coloring | |
background() | Background settings. |
Content Text Settings | |
disablePointerEvents() | Pointer events 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 |
---|---|---|
settings | string | Object | null | boolean | Background settings. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.disablePointerEvents
Returns:
boolean - The pointer events settings.var tags = resourceList.tags(); var disablePointerEvents = tags.disablePointerEvents();
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | false | Value to set. |
Returns:
anychart.core.ui.Tooltip - Self instance for method chaining.fontColor
Returns:
string - Text font color.var names = resourceList.names(); var color = names.fontColor();
Params:
Name | Type | Default | Description |
---|---|---|---|
color | 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 names = resourceList.names(); var fontDecoration = names.fontDecoration();
Params:
Name | Type | Default | Description |
---|---|---|---|
type | 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 names = resourceList.names(); var font = names.fontFamily();
Params:
Name | Type | Default | Description |
---|---|---|---|
fontFamily | 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 names = resourceList.names(); var opacity = names.fontOpacity();
Params:
Name | Type | Default | Description |
---|---|---|---|
opacity | 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 names = resourceList.names(); var size = names.fontSize();
Params:
Name | Type | Default | Description |
---|---|---|---|
size | 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 names = resourceList.names(); var style = names.fontStyle();
Params:
Name | Type | Default | Description |
---|---|---|---|
style | 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 names = resourceList.names(); var variant = names.fontVariant();
Params:
Name | Type | Default | Description |
---|---|---|---|
type | 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 names = resourceList.names(); var weight = names.fontWeight();
Params:
Name | Type | Default | Description |
---|---|---|---|
weight | 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 names = resourceList.names(); var hAlign = names.hAlign();
Params:
Name | Type | Default | Description |
---|---|---|---|
align | 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 names = resourceList.names(); var letterSpacing = names.letterSpacing();
Params:
Name | Type | Default | Description |
---|---|---|---|
spacing | 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 names = resourceList.names(); var lineHeight = names.lineHeight();
Params:
Name | Type | Default | Description |
---|---|---|---|
height | string | number | 'normal' | Line height to set. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
margin
Params:
Name | Type | Description |
---|---|---|
margin | Array.<(number|string)> | Object | Margin 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 |
---|---|---|
padding | Array.<(number|string)> | Object | Padding 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 names = resourceList.names(); var selectable = names.selectable();
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | false | Enabled state 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 names = resourceList.names(); var textDirection = names.textDirection();
Params:
Name | Type | Default | Description |
---|---|---|---|
type | 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 names = resourceList.names(); var textIndent = names.textIndent();
Params:
Name | Type | Default | Description |
---|---|---|---|
indent | number | 0 | Text indent 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 names = resourceList.names(); var textOverflow = names.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:
useHtml
Returns:
boolean - UseHTML flag.var names = resourceList.names(); var useHtmlFlag = names.useHtml();
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | 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 names = resourceList.names(); var vAlign = names.vAlign();
Params:
Name | Type | Default | Description |
---|---|---|---|
align | anychart.graphics.vector.Text.VAlign | string | 'top' | Value to set. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.Try it:
wordBreak
Returns:
anychart.enums.WordBreak | string - Word-break mode.var resourceList = chart.resourceList(); var names = resourceList.names(); var wordBreak = names.wordBreak();
Params:
Name | Type | Default | Description |
---|---|---|---|
mode | anychart.enums.WordBreak | string | 'normal' | Value to set. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.var resourceList = chart.resourceList(); var names = resourceList.names(); var wordBreak = names.wordBreak();
wordWrap
Returns:
anychart.enums.WordWrap | string - Word-wrap mode.var resourceList = chart.resourceList(); var names = resourceList.names(); var wordWrap = names.wordWrap();
Params:
Name | Type | Default | Description |
---|---|---|---|
mode | anychart.enums.WordWrap | string | 'normal' | Value to set. |
Returns:
anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.var resourceList = chart.resourceList(); var names = resourceList.names(); names.wordWrap("break-word");