Interface: IPriceFormatter
Charting Library.IPriceFormatter
Specific formatter for numbers
Hierarchy
-
↳
IPriceFormatter
Methods
format
▸ format(price
, signPositive?
, tailSize?
, signNegative?
, useRtlFormat?
, cutFractionalByPrecision?
): string
Price Formatter
Parameters
Name | Type | Description |
---|---|---|
price | number | price |
signPositive? | boolean | - |
tailSize? | number | add tailSize digits to fractional part of result string |
signNegative? | boolean | add minus sign to result string. |
useRtlFormat? | boolean | Use Right to left format |
cutFractionalByPrecision? | boolean | cuts price by priceScalePrecision, without rounding. |
Returns
string
formatted price
Overrides
formatChange
▸ formatChange(currentPrice
, prevPrice
, signPositive?
): string
Formatter for a price change
Parameters
Name | Type | Description |
---|---|---|
currentPrice | number | current price |
prevPrice | number | previous price |
signPositive? | boolean | is the sign of the number positive |
Returns
string