Skip to content

ChartArea.DragEnd

event · ChartArea · cAlgo.API

DesktopCLICloud

Occurs when mouse button is released while dragging a chart area or a chart area loses mouse capture.

Environment behaviour

CLI — not supported. Never raised: no chart is displayed, so there is nothing to interact with.

Cloud — not supported. Never raised: no chart is displayed, so there is nothing to interact with.

Definition

event Action<ChartDragEventArgs> DragEnd;
chartArea.DragEnd += handler  # handler(obj: ChartDragEventArgs)

Examples

protected override void OnStart()
{
    Chart.DragEnd += OnChartDragEnd;
}

private void OnChartDragEnd(ChartDragEventArgs args)
{
    Print("Drag ended at {0}, {1}", args.TimeValue, args.YValue);
}
def on_start(self):
    api.Chart.DragEnd += self.on_chart_drag_end

def on_chart_drag_end(self, args):
    api.Print(f"Drag ended at {args.TimeValue}, {args.YValue}")