boundingRatio
Aggregate function that calculates the slope between the leftmost and rightmost points across a group of values.
Example:
Sample data:
The boundingRatio() function returns the slope of the line between the leftmost and rightmost points, in the above data these points are (0,0) and (9,13.5).
boundingRatio
Introduced in: v20.1
Calculates the slope between the leftmost and rightmost points across a group of values.
Syntax
Arguments
x— X-coordinate values.(U)Int*orFloat*orDecimaly— Y-coordinate values.(U)Int*orFloat*orDecimal
Returned value
Returns the slope of the line between the leftmost and rightmost points, otherwise returns NaN if the data is empty. Float64
Examples
Sample data
Usage example