TextFormatter

Type class

Splits text into chunks of plain text and style blocks, such as [bold], and reads style blocks into text styles.

Sources

TextFormatter can be used (imported) via one of the following packages.

// Import TextFormatter
import * as am5 from "@amcharts/amcharts5";

// Create TextFormatter
am5.TextFormatter.new(root, {
  // ... config if applicable
});
<!-- Load TextFormatter -->
<script src="index.js"></script>

<script>
// Create TextFormatter
am5.TextFormatter.new(root, {
  // ... config if applicable
});
</script>

Inheritance

TextFormatter does not extend any other symbol.

TextFormatter is not extended by any other symbol.

Settings

TextFormatter does not have any settings.

Private settings

TextFormatter does not have any private settings.

Properties

prefix
#

Static

Type string

Default "__amcharts__"

Methods

getTextStyle(

style: string

)

#

Static

Returns ITextStyle

Reads a style block, such as [bold #f00 fontSize: 20px], into text style settings: a font weight, underline or line-through, a color, and any key: value pairs.

Events

TextFormatter does not have any events.