displayName() {
    const displayName = this.options()["display-name"];
    if (displayName) {
      return displayName;
    }
    const aggregation = this.aggregation();
    if (aggregation.isCustom()) {
      return aggregation._query.formatExpression(aggregation);
    } else if (aggregation.isMetric()) {
      const metric = aggregation.metric();
      if (metric) {
        return metric.displayName();
      }
    } else if (aggregation.isStandard()) {
      const option = aggregation.option();
      if (option) {
        const aggregationName =
          option.columnName || option.name.replace(" of ...", "");
        const dimension = aggregation.dimension();
        if (dimension) {
          return t`${aggregationName} of ${dimension.render()}`;
        } else {
          return aggregationName;
        }
      }
    }
    return null;
  }
/**
   * Returns the display name for the aggregation
   */
Returns the display name for the aggregation
Returns the display name for the aggregation
displayName() {
    const displayName = this.options()["display-name"];
    if (displayName) {
      return displayName;
    }
    const aggregation = this.aggregation();
    if (aggregation.isCustom()) {
      return aggregation._query.formatExpression(aggregation);
    } else if (aggregation.isMetric()) {
      const metric = aggregation.metric();
      if (metric) {
        return metric.displayName();
      }
    } else if (aggregation.isStandard()) {
      const option = aggregation.option();
      if (option) {
        const aggregationName =
          option.columnName || option.name.replace(" of ...", "");
        const dimension = aggregation.dimension();
        if (dimension) {
          return t`${aggregationName} of ${dimension.render()}`;
        } else {
          return aggregationName;
        }
      }
    }
    return null;
  }
displayName ( ) { const displayName = this . options ( ) [ "display-name" ] ; if ( displayName ) { return displayName ; } const aggregation = this . aggregation ( ) ; if ( aggregation . isCustom ( ) ) { return aggregation . _query . formatExpression ( aggregation ) ; } else if ( aggregation . isMetric ( ) ) { const metric = aggregation . metric ( ) ; if ( metric ) { return metric . displayName ( ) ; } } else if ( aggregation . isStandard ( ) ) { const option = aggregation . option ( ) ; if ( option ) { const aggregationName = option . columnName || option . name . replace ( " of ..." , "" ) ; const dimension = aggregation . dimension ( ) ; if ( dimension ) { return t ` ${ aggregationName } ${ dimension . render ( ) } ` ; } else { return aggregationName ; } } } return null ; }
Returns the display name for the aggregation
Returns the display name for the aggregation