MCPcopy Create free account
hub / github.com/microsoft/SandDance / labelFormat

Function labelFormat

docs/tests/v2/es6/js/sanddance.js:110440–110443  ·  view source on GitHub ↗
(scale, count, type, specifier, formatType, noSkip)

Source from the content-addressed store, hash-verified

110438}
110439
110440function labelFormat(scale, count, type, specifier, formatType, noSkip) {
110441 const format = formats[scale.type] && formatType !== _vegaScale.Time && formatType !== _vegaScale.UTC ? thresholdFormat(scale, specifier) : (0, _ticks.tickFormat)(scale, count, specifier, formatType, noSkip);
110442 return type === _legendTypes.Symbols && isDiscreteRange(scale) ? formatRange(format) : type === _legendTypes.Discrete ? formatDiscrete(format) : formatPoint(format);
110443}
110444
110445function formatRange(format) {
110446 return function (value, index, array) {

Callers

nothing calls this directly

Calls 5

thresholdFormatFunction · 0.70
isDiscreteRangeFunction · 0.70
formatRangeFunction · 0.70
formatDiscreteFunction · 0.70
formatPointFunction · 0.70

Tested by

no test coverage detected