StringField

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

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

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

Value parameters

path

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

Attributes

Example
spec.build(_.title := "New Title")
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 string fields, this effectively replaces the value.

Deep merge JSON into this field. For string 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 :=(s: String): SpecMod

Replace the field value with a string

Replace the field value with a string

Attributes

def :=(j: Json): SpecMod

Replace the field value with arbitrary JSON

Replace the field value with arbitrary JSON

Attributes

def :=(obj: JsonObject): SpecMod

Replace the field value with a JSON object

Replace the field value with a JSON object

Attributes

def apply(s: String): SpecMod
def apply(j: Json): SpecMod
def apply(obj: JsonObject): SpecMod