Skip to main content
Version: v26

AccountManagerColumnBase<TFormatterName>

Interface
Types Module: Broker

Column description for an account manager table

Type parameters

NameType
TFormatterNameextends StandardFormatterName | FormatterName

Properties

alignment

Optional

Horizontal alignment of the cell value. The default value is left.

alignmentdescription
leftIt aligns the cell value to the left
rightIt aligns the cell value to the right

Type

CellAlignment


dataFields

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 if avgPrice or qty 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.

Type

TFormatterName extends StandardFormatterName ? StandardFormattersDependenciesMapping[TFormatterName] : string[]


formatter

Optional

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:

namedescription
StandardFormatterName.DateDisplays the date or time.
StandardFormatterName.DateOrDateTimeDisplays 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.FixedDisplays a number with 2 decimal places.
StandardFormatterName.FixedInCurrencyDisplays a number with 2 decimal places and adds currency.
StandardFormatterName.FormatPriceDisplays symbol's price.
StandardFormatterName.FormatQuantityDisplays an integer or floating point quantity, separates thousands groups with a space.
StandardFormatterName.FormatPriceForexSupThe same as formatPrice, but it makes the last character of the price superscripted. It works only if instrument type is set to forex.
StandardFormatterName.LocalDateDisplays the local date or time.
StandardFormatterName.LocalDateOrDateTimeThe same as StandardFormatterName.DateOrDateTime, but it displays time in the local timezone.
StandardFormatterName.PipsDisplays a number with 1 decimal place.
StandardFormatterName.ProfitDisplays profit in account currency. It also adds the + sign, separates thousands and changes the cell text color to red or green.
StandardFormatterName.ProfitInInstrumentCurrencyDisplays profit in instrument currency. It also adds the + sign, separates thousands and changes the cell text color to red or green.
StandardFormatterName.SideIt is used to display the side: Sell or Buy.
StandardFormatterName.PositionSideIt is used to display the position side: Short or Long.
StandardFormatterName.StatusIt is used to format the status.
StandardFormatterName.SymbolIt 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.TextDisplays a text value.
StandardFormatterName.TypeIt is used to display the type of order: Limit/Stop/StopLimit/Market.
StandardFormatterName.VariablePrecisionDisplays a number with variable precision.

Type

TFormatterName


help

Optional

Tooltip string for the column.

Type

string


hideByDefault

Optional

When set to true will hide the column by default

Type

boolean


highlightDiff

Optional

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.

Type

boolean


id

Column id. Unique identifier of column.

Type

string


isCapitalize

Optional

If set to true, the first character of every word in the sentence in the column will be capitalized. The default value is true.

Type

boolean


label

Column title. It will be displayed in the table's header row.

Type

string


notHideable

Optional

When set to true will prevent the column from hiding.

Type

boolean


notSortable

Optional

When set to true will prevent column sorting.

Type

boolean


showZeroValues

Optional

When set to true any zero values will be hidden. Default is true

Type

boolean


sortProp

Optional

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.

Type

string


tooltipProperty

Optional

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.

Type

string