Interface: DecimalNumberOptions
Defined in: mobjects/text/DecimalNumber.ts:15
Options for creating a DecimalNumber mobject
Properties
color?
optionalcolor:string
Defined in: mobjects/text/DecimalNumber.ts:33
Text color as CSS color string. Default: '#ffffff'
edgeToFix?
optionaledgeToFix:"left"|"right"
Defined in: mobjects/text/DecimalNumber.ts:37
Edge to preserve when number width changes. Default: null (center)
fillOpacity?
optionalfillOpacity:number
Defined in: mobjects/text/DecimalNumber.ts:35
Fill opacity from 0 to 1. Default: 1
fontFamily?
optionalfontFamily:string
Defined in: mobjects/text/DecimalNumber.ts:29
Font family. Default: 'monospace'
fontSize?
optionalfontSize:number
Defined in: mobjects/text/DecimalNumber.ts:27
Font size in pixels. Default: 48
fontWeight?
optionalfontWeight:string|number
Defined in: mobjects/text/DecimalNumber.ts:31
Font weight. Default: 'normal'
groupWithCommas?
optionalgroupWithCommas:boolean
Defined in: mobjects/text/DecimalNumber.ts:25
Group digits with separator (e.g., 1,000). Default: false
includeSign?
optionalincludeSign:boolean
Defined in: mobjects/text/DecimalNumber.ts:23
Whether to show + sign for positive numbers. Default: false
numDecimalPlaces?
optionalnumDecimalPlaces:number
Defined in: mobjects/text/DecimalNumber.ts:19
Number of decimal places to show. Default: 2
showEllipsis?
optionalshowEllipsis:boolean
Defined in: mobjects/text/DecimalNumber.ts:21
Whether to show ellipsis (...) after the number. Default: false
unit?
optionalunit:string
Defined in: mobjects/text/DecimalNumber.ts:39
Unit string to append (e.g., '%', 'm/s'). Default: ''
unitBuff?
optionalunitBuff:number
Defined in: mobjects/text/DecimalNumber.ts:41
Buffer between number and unit. Default: 0.05
value?
optionalvalue:number
Defined in: mobjects/text/DecimalNumber.ts:17
The numeric value to display. Default: 0