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 TextFormatterimport * as am5 from "@amcharts/amcharts5";
// Create TextFormatteram5.TextFormatter.new(root, { // ... config if applicable});<!-- Load TextFormatter --><script src="index.js"></script>
<script>// Create TextFormatteram5.TextFormatter.new(root, { // ... config if applicable});</script>Inheritance
TextFormatter does not extend any other symbol.
TextFormatter is not extended by any other symbol.
Properties
prefixStaticType
stringDefault"__amcharts__"
Methods
getTextStyle(style:string)StaticReturns
ITextStyleReads a style block, such as
[bold #f00 fontSize: 20px], into text style settings: a font weight,underlineorline-through, a color, and anykey: valuepairs.
Events
TextFormatter does not have any events.