Threshold

<series> output = <series>.threshold(<number> level)

This function returns a data series containing the same number of points as the calling data series.  The value of the new data series is 1 if the corresponding sample in the calling data series exceeds the threshold Level, and a 0 if not. This function requires exactly one argument.

Example:

var myThreshold = mySeries.threshold(mySeries.max()*.8);

This example would show all the areas of the calling data series where the value exceeds 80% of the maximum value in the data series.