Type/to search
Built-in Functions
Structures
Ticker
Depth
OrderBook
Trade
Record
Market
Order
Condition
Account
Asset
Position
Funding
Other Structures
HttpQuery-options
HttpQuery-return
LogStatus-table
LogStatus-btnTypeOne
LogStatus-btnTypeTwo
Status Bar Components
grid
tabs
kpi
stat
progress
gauge
sparkline
chart
heatmap
calendar
histogram
pie
timeline
markdown
alert
badge
Chart-options
Chart-return
KLineChart-options
KLineChart-return
SetData-data
EventLoop-return
exchange.Go-return
DBExec-return
Dial-return
Thread.join-return
Built-in Variables and Constants
Conventions
Exchanges

Groups components into tabs; the selected tab is kept when the status bar refreshes.

Examples

Two tabs show market data and the account.

javascript
function main() { var ticker = exchange.GetTicker() var account = exchange.GetAccount() if (!ticker || !account) return LogStatus({type: "tabs", items: [ {title: "Market", cols: 2, items: [ {type: "kpi", title: "Last", value: ticker.Last}, {type: "kpi", title: "24h volume", value: ticker.Volume, format: {compact: true}} ]}, {title: "Account", items: [{type: "stat", items: [ {label: "Available", value: account.Balance}, {label: "Frozen", value: account.FrozenBalance} ]}]} ]}) }
python
def main(): ticker = exchange.GetTicker() account = exchange.GetAccount() if not ticker or not account: return LogStatus({"type": "tabs", "items": [ {"title": "Market", "cols": 2, "items": [ {"type": "kpi", "title": "Last", "value": ticker["Last"]}, {"type": "kpi", "title": "24h volume", "value": ticker["Volume"], "format": {"compact": True}} ]}, {"title": "Account", "items": [{"type": "stat", "items": [ {"label": "Available", "value": account["Balance"]}, {"label": "Frozen", "value": account["FrozenBalance"]} ]}]} ]})
rust
fn main() { let Ok(t) = exchange.GetTicker(None) else { return }; let Ok(a) = exchange.GetAccount() else { return }; let market = format!( r#"{{"title": "Market", "cols": 2, "items": [ {{"type": "kpi", "title": "Last", "value": {}}}, {{"type": "kpi", "title": "24h volume", "value": {}, "format": {{"compact": true}}}}]}}"#, t.Last, t.Volume ); let account = format!( r#"{{"title": "Account", "items": [{{"type": "stat", "items": [ {{"label": "Available", "value": {}}}, {{"label": "Frozen", "value": {}}}]}}]}}"#, a.Balance, a.FrozenBalance ); // When this JSON is the whole status bar it may span several lines LogStatus!(format!(r#"{{"type": "tabs", "items": [{}, {}]}}"#, market, account)); }

Attributes

NameTypeDescription

type

string

Required. Always tabs.

items

object array

Required. One entry per tab.

items[].title

string

Tab label.

items[].items

array

Components of the tab, laid out as a grid.

items[].cols

number

Number of columns of the tab. Default 1.

id

string

Stable identifier. Set it when the number or order of components changes, so refreshes do not rebuild the component.

span

number

Number of columns it spans in the enclosing grid. Default 1.

See Also

Remarks

tabs has no title of its own. The content of each tab drops columns with the container width like grid; nesting is limited to 6 levels.

An array of tables wrapped in backticks (the old style) is also shown as tabs; see LogStatus-table.