code: function groupData(data, dim) {
      var groups = {};
  
      each(data, function (record) {
        var value = record[dim];
        if (value === undefined) {
          value = record[dim] = DEFAULT_Y;
        }
        if (!groups[value]) {
          groups[value] = [];
        }
        groups[value].push(record);
      });
  
      return groups;
    }
docs: 对数据进行分组
  @param  {Array} data 数据
  @param  {String} dim 分组的字段
  @return {Object}  分组的键值对映射