markValue static method

VlJson markValue(
  1. VlChartMark m
)

Implementation

static VlJson markValue(VlChartMark m) {
  int n = m.props.keys.length;
  if ( n == 0 ) {
    return VlJson.stringValue(m.markType);
  }
  VlJson obj = VlJson.objectValue();
  obj.setMember("type", VlJson.stringValue(m.markType));
  for ( int ki = 0; ki < m.props.keys.length; ki++) {
    var k = m.props.keys[ki];
    obj.setMember(k, m.props._get(k));
  }
  return obj;
}