code: function(d) {
      // return keyPosition if defined
      if (d.keyPosition !== undefined && d.keyPosition !== null)
        return d.keyPosition;
      // check if the dimension is the time dimension. Add it to the end of the key
      if (d.id === TIME_DIMENSION) return dimCount - 1;
      return null;
    }
docs: Returns the position of the dimension in the series/obs key