calculate method

VlChart calculate(
  1. String expression,
  2. String _as
)

Adds a column computed from the others.

expression A Vega expression over the row's columns. _as The name of the new column.

Returns This chart, so calls chain.

Implementation

VlChart calculate(String expression, String _as) {
  VlJson t = VlJson.objectValue();
  t.setMember("calculate", VlJson.stringValue(expression));
  t.setMember("as", VlJson.stringValue(_as));
  this.transforms.arr.add(t);
  return this;
}