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

Function defaultColorScheme

packages/sanddance-explorer/src/colorScheme.ts:15–24  ·  view source on GitHub ↗
(c: SandDance.types.Column)

Source from the content-addressed store, hash-verified

13}
14
15function defaultColorScheme(c: SandDance.types.Column) {
16 if (c.quantitative) {
17 return 'redyellowgreen';
18 } else if (c.stats.distinctValueCount === 2) {
19 return 'dual_redgreen';
20 } else if (c.stats.distinctValueCount <= 10) {
21 return 'category10';
22 }
23 return 'category20';
24}

Callers 1

bestColorSchemeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected