MCPcopy Index your code
hub / github.com/microsoft/SandDance / formatRange

Function formatRange

docs/app/js/sanddance-app.js:127255–127258  ·  view source on GitHub ↗
(format3)

Source from the content-addressed store, hash-verified

127253 return type === SymbolLegend && isDiscreteRange(scale16) ? formatRange(format2) : type === DiscreteLegend ? formatDiscrete(format2) : formatPoint(format2);
127254}
127255const formatRange = (format3)=>(value, index, array)=>{
127256 const limit = get(array[index + 1], get(array.max, Infinity)), lo = formatValue(value, format3), hi = formatValue(limit, format3);
127257 return lo && hi ? lo + " \u2013 " + hi : hi ? "< " + hi : "\u2265 " + lo;
127258 };
127259const get = (value, dflt)=>value != null ? value : dflt;
127260const formatDiscrete = (format4)=>(value, index)=>index ? format4(value) : null;
127261const formatPoint = (format5)=>(value)=>format5(value);

Callers 1

labelFormatFunction · 0.70

Calls 2

getFunction · 0.70
formatValueFunction · 0.70

Tested by

no test coverage detected