Interface: AccountManagerColumnBase<TFormatterName>
Charting Library.AccountManagerColumnBase
Column description for an account manager table
Type parameters
Name | Type |
---|---|
TFormatterName | extends StandardFormatterName | FormatterName |
Properties
alignment
• Optional
alignment: CellAlignment
Horizontal alignment of the cell value. The default value is left
.
alignment | description |
---|---|
left | It aligns the cell value to the left |
right | It aligns the cell value to the right |
dataFields
• dataFields: TFormatterName
extends StandardFormatterName
? StandardFormattersDependenciesMapping
[TFormatterName
<TFormatterName
>] : string
[]
dataFields
is an array with data object fields that is used to get the data to display in a column.
The displayed value in the column will only change if one of the corresponding data object values change.
If the formatter
is not set, the displayed values will be space-separated in the column.
If a formatter
is specified, it will only get the specified values.
Specify an empty array as the dataFields
and the formatter will receive the entire data object.
Example Example
- If you have column with
dataFields
set as['avgPrice', 'qty']
, then displayed value will update only ifavgPrice
orqty
values of the data object have been changed. - If you have column with
dataFields
set as[]
, then displayed value will update if some data object values have been changed.
formatter
• Optional
formatter: TFormatterName
Name of the formatter to be used for data formatting. It can be one of two types - StandardFormatterName
or FormatterName
. If formatter
is not set, then the value is displayed as is.
Formatter can be a default or a custom one.
Default formatter names are listed in StandardFormatterName
enumerator. If you want to use a custom formatter, you must typecast its name to FormatterName
to confirm your confidence that you are using the correct name.
Here is the list of default formatters:
name | description |
---|---|
StandardFormatterName.Date | Displays the date or time. |
StandardFormatterName.DateOrDateTime | Displays the date or date and time. This formatter accepts an {dateOrDateTime: number, hasTime: boolean} object. If hasTime is set to true then the date and time are displayed. Otherwise only the date is displayed. |
StandardFormatterName.Fixed | Displays a number with 2 decimal places. |
StandardFormatterName.FixedInCurrency | Displays a number with 2 decimal places and adds currency. |
StandardFormatterName.FormatPrice | Displays symbol's price. |
StandardFormatterName.FormatQuantity | Displays an integer or floating point quantity, separates thousands groups with a space. |
StandardFormatterName.FormatPriceForexSup | The same as formatPrice , but it makes the last character of the price superscripted. It works only if instrument type is set to forex . |
StandardFormatterName.LocalDate | Displays the local date or time. |
StandardFormatterName.LocalDateOrDateTime | The same as StandardFormatterName.DateOrDateTime , but it displays time in the local timezone. |
StandardFormatterName.Pips | Displays a number with 1 decimal place. |
StandardFormatterName.Profit | Displays profit in account currency. It also adds the + sign, separates thousands and changes the cell text color to red or green. |
StandardFormatterName.ProfitInInstrumentCurrency | Displays profit in instrument currency. It also adds the + sign, separates thousands and changes the cell text color to red or green. |
StandardFormatterName.Side | It is used to display the side: Sell or Buy. |
StandardFormatterName.PositionSide | It is used to display the position side: Short or Long. |
StandardFormatterName.Status | It is used to format the status . |
StandardFormatterName.Symbol | It is used for a symbol field. It displays brokerSymbol , but when you click on a symbol the chart changes according to the symbol field. |
StandardFormatterName.Text | Displays a text value. |
StandardFormatterName.Type | It is used to display the type of order: Limit/Stop/StopLimit/Market. |
StandardFormatterName.VariablePrecision | Displays a number with variable precision. |
help
• Optional
help: string
Tooltip string for the column.
hideByDefault
• Optional
hideByDefault: boolean
When set to true
will hide the column by default
highlightDiff
• Optional
highlightDiff: boolean
highlightDiff
can be set with StandardFormatterName.FormatPrice
and StandardFormatterName.FormatPriceForexSup
formatters to highlight the changes of the field. If set to true
then custom formatters will also get previous values.
id
• id: string
Column id. Unique identifier of column.
isCapitalize
• Optional
isCapitalize: boolean
If set to true
, the first character of every word in the sentence in the column
will be capitalized. The default value is true
.
label
• label: string
Column title. It will be displayed in the table's header row.
notHideable
• Optional
notHideable: boolean
When set to true
will prevent the column from hiding.
notSortable
• Optional
notSortable: boolean
When set to true
will prevent column sorting.
showZeroValues
• Optional
showZeroValues: boolean
When set to true
any zero values will be hidden. Default is true
sortProp
• Optional
sortProp: string
Data object key that is used for data sorting
If sortProp
is not provided, then the first element of the dataFields
array will be used. If the dataFields
array is empty, then column sorting will be unavailable.
tooltipProperty
• Optional
tooltipProperty: string
Key of the row object that is used to get the tooltip to display when hovering over a cell. The tooltip property refers to an object whose keys are property names and values are the corresponding tooltips.