encodeJson method

VlChartMark encodeJson(
  1. String channel,
  2. VlJson definition
)

Sets a whole channel from an already-built definition.

The escape hatch. Vega-Lite is larger than any fluent surface over it, and a definition that lands in the same specification is better than waiting for this API to grow a method.

channel The channel name. definition The channel definition.

Returns This mark, so calls chain.

Implementation

VlChartMark encodeJson(String channel, VlJson definition) {
  this.enc.setMember(channel, definition);
  cursor = channel;
  return this;
}