Skip to content

ChartTemplate.Apply

method · ChartTemplate · cAlgo.API Since 5.6

DesktopCLICloud

Applies current chart template to a chart.

Environment behaviour

Cloud — not supported. Never available in the cloud: it is only returned by members that do not work there (ChartTemplates, ChartTemplates.Create, ChartTemplates.DefaultTemplate and more).

Definition

void Apply(Chart chart)
chartTemplate.Apply(chart: Chart) -> None

Parameters

Name C# type Python type Description
chart Chart Chart Chart that will be current template applied to.

Examples

var template = ChartTemplates.Get("My Template");
if (template != null)
{
    template.Apply(Chart);
    Print("Applied template {0}", template.Name);
}
template = api.ChartTemplates.Get("My Template")
if template is not None:
    template.Apply(api.Chart)
    api.Print(f"Applied template {template.Name}")