d4.js
function(opts, data) {
    var parsed = d4.parsers.nestedGroup()
      .x(opts.x.$key)
      .y(opts.y.$key)
      .nestKey(opts.x.$key)
      .value(opts.valueKey)(data);
    return parsed.data;
  }
function(opts, data) {
    var parsed = d4.parsers.nestedGroup()
      .x(opts.x.$key)
      .y(opts.y.$key)
      .nestKey(opts.x.$key)
      .value(opts.valueKey)(data);
    return parsed.data;
  }
function ( opts , data ) { var parsed = d4 . parsers . nestedGroup ( ) . x ( opts . x . $key ) . y ( opts . y . $key ) . nestKey ( opts . x . $key ) . value ( opts . valueKey ) ( data ) ; return parsed . data ; }
Normally d4 series elements inside the data array to be in a specific format, which is designed to support charts which require multiple data series. However, some charts can easily be used to display only a single data series in which case the default structure is overly verbose. In these cases d4 accepts the simplified objects in the array payload and silently parses them using the d4.nestedGroup parser. It will configure the parser's dimensions based on the configuration applied to the chart object itself.
Normally d4 series elements inside the data array to be in a specific format which is designed to support charts which require multiple data series . However some charts can easily be used to display only a single data series in which case the default structure is overly verbose . In these cases d4 accepts the simplified objects in the array payload and silently parses them using the d4 . nestedGroup parser . It will configure the parser s dimensions based on the configuration applied to the chart object itself .