Custom functions for the Vega expression language.
npm install vega-functionsFunction implementations for the Vega expression language. Unlike the basic utility functions included in the vega-expression package, this package includes custom expression functions, many of which are specific to Vega dataflows.
This package provides the following expression functions. All other constants and functions are provided by the base vega-expression package.
Type Checking Functions
- isArray
- isBoolean
- isDate
- isNumber
- isObject
- isRegExp
- isString
- isTuple
Type Coercion Functions
- toBoolean
- toDate
- toNumber
- toString
Math Functions
- random
Date/Time Functions
Array Functions
- clampRange
- extent
- inrange
- lerp
- peek
- sequence
- span
String Functions
Object Functions
- merge
Formatting Functions
- format
- utcFormat
- utcParse
- timeFormat
- timeParse
- monthFormat
- monthAbbrevFormat
- dayFormat
- dayAbbrevFormat
Color Functions
Event Functions
- pinchDistance
- pinchAngle
- inScope
Scale and Projection Functions
- bandspace
- bandwidth
- copy
- domain
- gradient
- invert
- range
- scale
- panLinear
- panLog
- panPow
- panSymlog
- zoomLinear
- zoomLog
- zoomPow
- zoomSymlog
- flush (used internally for axis and legend label layout)
Geographic Functions
- geoArea
- geoBounds
- geoCentroid
- geoScale
Shape Functions
- geoShape (used internally for mark clipping)
- pathShape (used internally for mark clipping)
Data Functions
- indata
- data
- setdata (used internally for scale domain data)
- modify (used internally for trigger updates)
Dataflow Functions
- encode (used internally for signal updates)
Tree (Hierarchy) Functions
Browser Functions
- screen
- containerSize
- windowSize
Logging Functions