Skip to content
Snippets Groups Projects
Commit c414dd44 authored by Tom Robinson's avatar Tom Robinson
Browse files

AggregationDimension: more correct displayName

parent a7c44355
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ import { t, ngettext, msgid } from "c-3po";
import Icon from "metabase/components/Icon";
import { stripId } from "metabase/lib/formatting";
import { getFriendlyName } from "metabase/visualizations/lib/utils";
import Query_DEPRECATED from "metabase/lib/query";
import _ from "underscore";
......@@ -614,8 +615,10 @@ export class AggregationDimension extends Dimension {
}
displayName(): string {
const aggregation = this.aggregation();
return aggregation ? aggregation[0] : "[Unknown]";
const name = this.columnName();
return name
? getFriendlyName({ name: name, display_name: name })
: `[${t`Unknown`}]`;
}
fieldDimension() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment