ChartArea.YToYValue
method · ChartArea · cAlgo.API
DesktopCLICloud
Converts Mouse Y coordinate to area Y axis coordinate value.
Environment behaviour
CLI — not supported. Always returns 0; no conversion is done.
Cloud — not supported. Always returns 0; no conversion is done.
Definition
double YToYValue(double y)
chartArea.YToYValue(y: float) -> float
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
y | double | float | Mouse Y coordinate |
Returns double — Area Y axis coordinate value
Examples
var priceAtCenter = Chart.YToYValue(Chart.Height / 2);
Print("Price at the chart center: {0}", priceAtCenter);
priceAtCenter = api.Chart.YToYValue(api.Chart.Height / 2)
api.Print(f"Price at the chart center: {priceAtCenter}")