ChartMouseEventArgs.MouseY
property · ChartMouseEventArgs · cAlgo.API
DesktopCLICloud
Gets the Y-axis value of the mouse event.
Environment behaviour
CLI — not supported. Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more).
Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more).
Definition
public double MouseY {get;}
chartMouseEventArgs.MouseY: float
Returns double
Examples
protected override void OnStart()
{
Chart.MouseMove += OnChartMouseMove;
}
private void OnChartMouseMove(ChartMouseEventArgs args)
{
Chart.DrawStaticText("mouseY", "Mouse Y: " + args.MouseY, VerticalAlignment.Top, HorizontalAlignment.Left, Color.White);
}
def on_start(self):
api.Chart.MouseMove += self.on_chart_mouse_move
def on_chart_mouse_move(self, args):
api.Chart.DrawStaticText("mouseY", f"Mouse Y: {args.MouseY}", VerticalAlignment.Top, HorizontalAlignment.Left, Color.White)