Top
You are looking at an outdated 7.13.0 version of this document. Switch to the 7.14.3 version to see the up to date information.

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

Getter for tags background.

Returns:

anychart.core.ui.Background - Background instance.
Setter for tags background.

Params:

Name Type Description
value string | Object | null | boolean Background settings.

Returns:

anychart.core.resource.resourceList.TagsSettings - Self instance for method chaining.

fontColor

Getter for the font color.

Returns:

string - Text font color.
See listing
var currentNames = currentResourceList.names();
var color = currentNames.fontColor();
Setter for the font color.

Params:

Name Type Default Description
value string
"#000"
Font color.

Returns:

anychart.core.resource.resourceList.TextSettings - Self instance for method chaining.

Try it:

fontDecoration

Getter for the text font decoration.

Returns:

anychart.graphics.vector.Text.Decoration string - The font decoration.
See listing
var currentNames = currentResourceList.names();
var decoration = currentNames.fontDecoration();
Setter for the text font decoration.

Params:

Name Type Default Description
value anychart.graphics.vector.Text.Decoration | string
"none"
Font decoration

Returns:

anychart.core.resource.resourceList.TextSettings - Self instance for method chaining.

Try it:

fontFamily

Getter for the font family.

Returns:

string - Text font family.
See listing
var currentNames = currentResourceList.names();
var font = currentNames.fontFamily();
Setter for the font family.

Params:

Name Type Default Description
value string
"Helvetica Neue","Helvetica",sans-serif
Font family.

Returns:

anychart.core.resource.resourceList.TextSettings - Self instance for method chaining.

Try it:

fontOpacity

Getter for the font opacity.

Returns:

number - Text font opacity.
See listing
var currentNames = currentResourceList.names();
var opacity = currentNames.fontOpacity();
Setter for the font opacity.

Params:

Name Type Default Description
value number
1
Font opacity.

Returns:

anychart.core.resource.resourceList.TextSettings - Self instance for method chaining.

Try it:

fontSize

Getter for the text font size.

Returns:

string number - Text font size.
See listing
var currentNames = currentResourceList.names();
var size = currentNames.fontSize();
Setter for the text font size text.

Params:

Name Type Default Description
value string | number
17
Font size.

Returns:

anychart.core.resource.resourceList.TextSettings - Self instance for method chaining.

Try it:

fontStyle

Getter for the font style.

Returns:

anychart.graphics.vector.Text.FontStyle string - Text font style.
See listing
var currentNames = currentResourceList.names();
var style = currentNames.fontStyle();
Setter for the font style.

Params:

Name Type Default Description
value anychart.graphics.vector.Text.FontStyle | string
"normal"
Font style.

Returns:

anychart.core.resource.resourceList.TextSettings - Self instance for method chaining.

Try it:

fontVariant

Getter for the font variant.

Returns:

anychart.graphics.vector.Text.FontVariant string - The font variant.
See listing
var currentNames = currentResourceList.names();
var variant = currentNames.fontVariant();
Setter for the font variant.

Params:

Name Type Default Description
value anychart.graphics.vector.Text.FontVariant | string
"normal"
Font variant.

Returns:

anychart.core.resource.resourceList.TextSettings - Self instance for method chaining.

Try it:

fontWeight

Getter for the font weight.

Returns:

string number - The font weight.
See listing
var currentNames = currentResourceList.names();
var weight = currentNames.fontWeight();
Setter for the font weight.

Params:

Name Type Default Description
value string | number
"bold"
Font weight.

Returns:

anychart.core.resource.resourceList.TextSettings - Self instance for method chaining.

Try it:

hAlign

Getter for the font horizontal align.

Returns:

anychart.graphics.vector.Text.HAlign string - Font horizontal align.
See listing
var currentNames = currentResourceList.names();
var currentHAlign = currentNames.hAlign();
Setter for the font horizontal align.

Params:

Name Type Default Description
value anychart.graphics.vector.Text.HAlign | string
"start"
Value to set.

Returns:

anychart.core.resource.resourceList.TextSettings - Self instance for method chaining.

Try it:

letterSpacing

Getter for the letter spacing.

Returns:

string number - The letter spacing.
See listing
var currentNames = currentResourceList.names();
var currentLetterSpacing = currentNames.letterSpacing();
Setter for the letter spacing.

Params:

Name Type Default Description
value string | number
"normal"
Value to set.

Returns:

anychart.core.resource.resourceList.TextSettings - Self instance for method chaining.

Try it:

lineHeight

Getter for the font line height.

Returns:

string number - Line height.
See listing
var currentNames = currentResourceList.names();
var currentLineHeight = currentNames.lineHeight();
Setter for the font line height.

Params:

Name Type Default Description
value string | number
"normal"
Value to set.

Returns:

anychart.core.resource.resourceList.TextSettings - Self instance for method chaining.

Try it:

margin

Getter for the margin.

Returns:

anychart.core.utils.Margin - The margin.

Try it:

Setter for the margin using a single value.

Params:

Name Type Description
value Array.<(number|string)> | Object Value to set.

Returns:

anychart.core.resource.resourceList.SettingsWithMargin - Self instance for method chaining.

Try it:

Setter for the callout margin using several values.

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.SettingsWithMargin - Self instance for method chaining.

Try it:

padding

Getter for tags padding.

Returns:

anychart.core.utils.Padding - Tags padding.

Try it:

Setter for padding in pixels by one value.

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:

Setter for tags padding in pixels.

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

Getter for the text selectable.

Returns:

boolean - The text selectable option.
See listing
var currentNames = currentResourceList.names();
var currentSelectable = currentNames.selectable();
Setter for the text selectable.

Params:

Name Type Default Description
value boolean
false
Value to set.

Returns:

anychart.core.resource.resourceList.TextSettings - 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 currentNames = currentResourceList.names();
var direction = currentNames.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.resource.resourceList.TextSettings - Self instance for method chaining.

Try it:

textIndent

Getter for text indent settings.

Returns:

number - Text indent.
See listing
var currentNames = currentResourceList.names();
var currentTextIndent = currentNames.textIndent();
Setter for text indent settings.

Params:

Name Type Default Description
value number
0
Value to set.

Returns:

anychart.core.resource.resourceList.TextSettings - Self instance for method chaining.

Try it:

textOverflow

Getter for text overflow settings.

Returns:

anychart.graphics.vector.Text.TextOverflow string - Text overflow settings.
See listing
var currentNames = currentResourceList.names();
var currentTextOverflow = currentNames.textOverflow();
Setter for text overflow settings.

Params:

Name Type Default Description
value anychart.graphics.vector.Text.TextOverflow | string
"..."
Value to set.

Returns:

anychart.core.resource.resourceList.TextSettings - Self instance for method chaining.

Try it:

textWrap

Getter for the text wrap.

Returns:

anychart.graphics.vector.Text.TextWrap string - Text wrap settings.
See listing
var currentNames = currentResourceList.names();
var currentTextWrap = currentNames.textWrap();
Setter for the text wrap.

Params:

Name Type Default Description
value anychart.graphics.vector.Text.TextWrap | string
"noWrap"
Value to set.

Returns:

anychart.core.resource.resourceList.TextSettings - Self instance for method chaining.

Try it:

useHtml

Getter for the useHTML flag.

Returns:

boolean - UseHTML flag.
See listing
var currentNames = currentResourceList.names();
var useHtmlFlag = currentNames.useHtml();
Setter for the useHTML flag.

Params:

Name Type Default Description
value boolean
false
Value to set.

Returns:

anychart.core.resource.resourceList.TextSettings - Self instance for method chaining.

Try it:

vAlign

Getter for the font vertical align.

Returns:

anychart.graphics.vector.Text.VAlign string - Font vertical align.
See listing
var currentNames = currentResourceList.names();
var currentVAlign = currentNames.vAlign();
Setter for the font vertical align.

Params:

Name Type Default Description
value anychart.graphics.vector.Text.VAlign | string
"top"
Value to set.

Returns:

anychart.core.resource.resourceList.TextSettings - Self instance for method chaining.

Try it: