valueString method

VlChartMark valueString(
  1. String channel,
  2. String value
)

Sets a channel to a constant string rather than to a column.

This is how a mark is painted a fixed colour: .valueString("color" "#c00"). The channel setters name columns and never constants, because a .color(…) that guessed between the two would draw a chart nobody asked for.

channel The channel name. value The constant.

Returns This mark, so calls chain.

See also valueNumber.

Implementation

VlChartMark valueString(String channel, String value) {
  VlJson ch = VlJson.objectValue();
  ch.setMember("value", VlJson.stringValue(value));
  this.enc.setMember(channel, ch);
  cursor = channel;
  return this;
}