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

Function addZScale

packages/sanddance-specs/src/zBase.ts:8–19  ·  view source on GitHub ↗
(z: Column, zSize: string, dataName: string, zScaleName: string)

Source from the content-addressed store, hash-verified

6import { RangeScheme } from 'vega-typings';
7
8export function addZScale(z: Column, zSize: string, dataName: string, zScaleName: string) {
9 if (z) {
10 const zRange: RangeScheme = [0, { signal: `(${zSize}) * ${SignalNames.ZProportion}` }];
11 const scale = z.quantitative
12 ?
13 linearScale(zScaleName, dataName, z.name, zRange, false, true)
14 :
15 pointScale(zScaleName, dataName, zRange, z.name, false)
16 ;
17 return scale;
18 }
19}

Callers 3

buildMethod · 0.90
buildMethod · 0.90
buildMethod · 0.90

Calls 2

linearScaleFunction · 0.90
pointScaleFunction · 0.90

Tested by

no test coverage detected