UNPKG

vega-lite-api

Version:
108 lines (95 loc) 2.04 kB
import {BaseObject, assign, copy, flat, get, init, set} from './__util__.js'; class ConfigInterval extends BaseObject { constructor(...args) { super(); init(this); set(this, "type", "interval"); assign(this, ...args); } clear(value) { if (arguments.length) { const obj = copy(this); set(obj, "clear", value); return obj; } else { return get(this, "clear"); } } encodings(...value) { if (arguments.length) { const obj = copy(this); value = flat(value); set(obj, "encodings", value); return obj; } else { return get(this, "encodings"); } } fields(...value) { if (arguments.length) { const obj = copy(this); value = flat(value); set(obj, "fields", value); return obj; } else { return get(this, "fields"); } } mark(value) { if (arguments.length) { const obj = copy(this); set(obj, "mark", value); return obj; } else { return get(this, "mark"); } } on(value) { if (arguments.length) { const obj = copy(this); set(obj, "on", value); return obj; } else { return get(this, "on"); } } resolve(value) { if (arguments.length) { const obj = copy(this); set(obj, "resolve", value); return obj; } else { return get(this, "resolve"); } } translate(value) { if (arguments.length) { const obj = copy(this); set(obj, "translate", value); return obj; } else { return get(this, "translate"); } } type(value) { if (arguments.length) { const obj = copy(this); set(obj, "type", value); return obj; } else { return get(this, "type"); } } zoom(value) { if (arguments.length) { const obj = copy(this); set(obj, "zoom", value); return obj; } else { return get(this, "zoom"); } } } export function configInterval(...args) { return new ConfigInterval(...args); }