Skip to content

ChartDraggables.Remove

method · ChartDraggables · cAlgo.API Since 5.2

DesktopCLICloud

Removes a draggable from chart area.

Environment behaviour

CLI — not supported. Add returns a draggable that is never displayed; Remove sends nothing to any chart.

Cloud — not supported. Add returns a draggable that is never displayed; Remove sends nothing to any chart.

Definition

void Remove(ChartDraggable draggable)
chartDraggables.Remove(draggable: ChartDraggable) -> None

Parameters

Name C# type Python type Description
draggable ChartDraggable ChartDraggable Draggable

Examples

var draggable = Chart.Draggables.Add();
draggable.Child = new TextBlock { Text = "Temporary", BackgroundColor = Color.Black };
Chart.Draggables.Remove(draggable);
Print("Draggables on the chart: {0}", Chart.Draggables.Count);
draggable = api.Chart.Draggables.Add()
textBlock = TextBlock()
textBlock.Text = "Temporary"
draggable.Child = textBlock
api.Chart.Draggables.Remove(draggable)
api.Print(f"Draggables on the chart: {api.Chart.Draggables.Count}")