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
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

The chart object returned by Chart, used to write data, update the configuration and clear the chart.

Attributes

NameTypeDescription

add(series, data, index)

function

Writes data to the chart. series is the index of the data series (integer); data is the data to write (array), for example [1574993606000, 13.5]; the optional index selects the data point to modify, negative values allowed, -1 being the last point; without it the data is appended to the series. For example, to modify the last point of series[0]: chart.add(0, [1574993606000, 13.5], -1). In Rust it is add(series, data_json, index) and index is required; a value below 0 appends.

update(options)

function

Replaces the current configuration with a new chart configuration (same as the Chart() argument). Charts without a time axis (for example pie) are updated by passing the whole configuration to update().

reset(remain)

function

Clears the chart data; remain is the number of data points to keep, all are cleared when omitted.

del(series)

function

Deletes the data series at the given index; with an argument of 0 or less, or none, the whole chart (including its configuration) is deleted. In Python the method is named dell() (del is a keyword); Rust has no such method.

See Also