D3.js scaleThreshold() Function
The d3.scaleThreshold() function in D3.js is used to create and return a new threshold scale that has the specified domain and range. The default value of domain is [0.5] and that of range is [0, 1]. Syntax: d3.scaleThreshold( domain, range ) Parameters: This function accepts two parameters as given