NumField

viz.macros.NumField
class NumField(path: List[String])

Accessor for numeric fields in a Vega/Vega-Lite spec.

Provides type-safe modification of number-valued JSON fields.

Value parameters

path

The JSON path to this field as a list of field names

Attributes

Example
spec.build(_.width := 800, _.height := 600.5)
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def +=(j: Json): SpecMod

Deep merge JSON into this field. For numeric fields, this effectively replaces the value.

Deep merge JSON into this field. For numeric fields, this effectively replaces the value.

Attributes

def +=(obj: JsonObject): SpecMod

Deep merge a JSON object into this field

Deep merge a JSON object into this field

Attributes

def :=(n: Int): SpecMod

Replace the field value with an integer

Replace the field value with an integer

Attributes

def :=(n: Double): SpecMod

Replace the field value with a double

Replace the field value with a double

Attributes

def :=(j: Json): SpecMod

Replace the field value with arbitrary JSON

Replace the field value with arbitrary JSON

Attributes

def apply(n: Int): SpecMod
def apply(n: Double): SpecMod
def apply(j: Json): SpecMod