Skip to content

Commit e82fd2b

Browse files
committed
Use getFieldDisplayName
1 parent c10aa3b commit e82fd2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/result_transformer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ import {
1111
FieldType,
1212
formatLabels,
1313
getDisplayProcessor,
14+
getFieldDisplayName,
1415
Labels,
1516
PreferredVisualisationType,
1617
renderLegendFormat,
1718
ScopedVars,
1819
TIME_SERIES_TIME_FIELD_NAME,
1920
TIME_SERIES_VALUE_FIELD_NAME,
2021
} from '@grafana/data';
21-
import { calculateFieldDisplayName } from '@grafana/data';
2222
import { config, FetchResponse, getDataSourceSrv, getTemplateSrv } from '@grafana/runtime';
2323
import { descending, deviation } from 'd3';
2424
import { flatten, forOwn, groupBy, partition } from 'lodash';
@@ -79,7 +79,7 @@ export function transformV2(
7979
f.fields.forEach((field) => {
8080
if (field.labels?.__name__ && field.labels?.__name__ === field.name) {
8181
const fieldCopy = { ...field, name: TIME_SERIES_VALUE_FIELD_NAME };
82-
field.config.displayNameFromDS = calculateFieldDisplayName(fieldCopy, f, response.data);
82+
field.config.displayNameFromDS = getFieldDisplayName(fieldCopy, f, response.data);
8383
}
8484
});
8585
}

0 commit comments

Comments
 (0)