# Interface TextSymbolJson

Text symbols are used to add text to a feature (labeling).

See https://developers.arcgis.com/web-map-specification/objects/esriTS_symbol/.

interface TextSymbolJson {
angle?: number;
backgroundColor?: ColorJson;
borderLineColor?: ColorJson;
borderLineSize?: number;
color?: ColorJson;
font?: FontJson;
haloColor?: ColorJson;
haloSize?: number;
horizontalAlignment?:
| "center"
| "left"
| "right"
| "justify";
kerning?: boolean;
rightToLeft?: boolean;
rotated?: boolean;
text?: string;
type: "esriTS";
verticalAlignment?:
| "baseline"
| "top"
| "middle"
| "bottom";
xoffset?: number;
yoffset?: number;
}

#### Hierarchy (view full)

- SymbolJsonBase
  - TextSymbolJson

#####
Index

### Properties

angle?
backgroundColor?
borderLineColor?
borderLineSize?
color?
font?
haloColor?
haloSize?
horizontalAlignment?
kerning?
rightToLeft?
rotated?
text?
type
verticalAlignment?
xoffset?
yoffset?

##
Properties

### `Optional` angle

angle?: number

A numeric value that defines the number of degrees (0 to 360) that a text symbol is rotated. The rotation is from East in a counter-clockwise direction where East is the 0° axis.

### `Optional` backgroundColor

backgroundColor?: ColorJson

Background color of the text.

### `Optional` borderLineColor

borderLineColor?: ColorJson

Value indicating the the color of the border line.

### `Optional` borderLineSize

borderLineSize?: number

Numeric value indicating the the size of the border line in points.

### `Optional` color

color?: ColorJson

Color is represented as a four-element array. The four elements represent values for red, green, blue, and alpha in that order. Values range from 0 through 255. If color is undefined for a symbol, the color value is null.

### `Optional` font

font?: FontJson

Font used for text symbols.

### `Optional` haloColor

haloColor?: ColorJson

Color of the halo around the text.

### `Optional` haloSize

haloSize?: number

Numeric value indicating the point size of a halo around the text symbol.

### `Optional` horizontalAlignment

horizontalAlignment?:
| "center"
| "left"
| "right"
| "justify"

The horizontal alignment of the text.

### `Optional` kerning

kerning?: boolean

Boolean value indicating whether to adjust the spacing between characters in the text string.

### `Optional` rightToLeft

rightToLeft?: boolean

Boolean value, set to true if using Hebrew or Arabic fonts.

### `Optional` rotated

rotated?: boolean

Boolean value indicating whether every character in the text string is rotated.

### `Optional` text

text?: string

Only applicable when specified as a client-side graphic.

### type

type

The type of symbol. See SymbolJsonType.

Overrides SymbolJsonBase.type

### `Optional` verticalAlignment

verticalAlignment?:
| "baseline"
| "top"
| "middle"
| "bottom"

The vertical alignment of the text.

### `Optional` xoffset

xoffset?: number

Numeric value indicating the offset on the x-axis in pixels.

### `Optional` yoffset

yoffset?: number

Numeric value indicating the offset on the y-axis in pixels.