independent method

VlChart independent(
  1. String channel
)

Stops the layers sharing one scale on a channel.

Two marks measuring different things up the same side of the plot must not share a scale. This is what makes a Pareto chart — bars against a count, a line against a running percentage — rather than two series averaged into one axis neither of them asked for.

channel The channel to split, usually "y".

Returns This chart, so calls chain.

Implementation

VlChart independent(String channel) {
  VlJson scales = resolve._get("scale");
  if ( false == scales.isObject() ) {
    VlJson fresh = VlJson.objectValue();
    this.resolve.setMember("scale", fresh);
    scales = fresh;
  }
  scales.setMember(channel, VlJson.stringValue("independent"));
  return this;
}