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

Function ordinalScale

packages/sanddance-specs/src/ordinal.ts:43–56  ·  view source on GitHub ↗
(dataName: string, scaleName: string, binFields: string[])

Source from the content-addressed store, hash-verified

41}
42
43export function ordinalScale(dataName: string, scaleName: string, binFields: string[]): OrdinalScale {
44 return {
45 type: 'ordinal',
46 name: scaleName,
47 domain: {
48 data: dataName,
49 field: safeFieldName(binFields[0]),
50 },
51 range: {
52 data: dataName,
53 field: FieldNames.Ordinal,
54 },
55 };
56}
57

Callers 2

buildMethod · 0.90
createOrdinalsFunction · 0.70

Calls 1

safeFieldNameFunction · 0.90

Tested by

no test coverage detected