Skip to content

ChartTemplateColorSettings.BackgroundColor

property · ChartTemplateColorSettings · cAlgo.API Since 5.6

DesktopCLICloud

Gets or sets the color of the chart background.

Environment behaviour

Cloud — not supported. Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings).

Definition

Color BackgroundColor {get; set;}
chartTemplateColorSettings.BackgroundColor: Color

Returns Color

Examples

var template = ChartTemplates.Get("My Template");
if (template != null)
{
    template.ColorSettings.BackgroundColor = Color.Black;
    Print("Template background color: {0}", template.ColorSettings.BackgroundColor);
}
template = api.ChartTemplates.Get("My Template")
if template is not None:
    template.ColorSettings.BackgroundColor = Color.Black
    api.Print(f"Template background color: {template.ColorSettings.BackgroundColor}")