Skip to content

ChartContainers.Get

method · ChartContainers · cAlgo.API

DesktopCLICloud

Returns a chart container by it is ID.

Environment behaviour

CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.

Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.

Definition

ChartContainer Get(string id)
chartContainers.Get(id: str) -> ChartContainer | None

Parameters

Name C# type Python type Description
id string str Chart container ID

Returns ChartContainer — Returns the matching chart container or null.

Examples

var mainContainerId = ChartManager.ChartContainers.MainChartContainer.Id;
var chartContainer = ChartManager.ChartContainers.Get(mainContainerId);
if (chartContainer != null)
    Print("Found container {0} with {1} frames", chartContainer.Id, chartContainer.Count);
mainContainerId = api.ChartManager.ChartContainers.MainChartContainer.Id
chartContainer = api.ChartManager.ChartContainers.Get(mainContainerId)
if chartContainer is not None:
    api.Print(f"Found container {chartContainer.Id} with {chartContainer.Count} frames")