Commit 61463aa1 by Torkel Ödegaard Committed by GitHub

Transform: Fixed issue in labels to fields and update docs (#27501)

parent 6932b459
......@@ -50,7 +50,16 @@ describe('Labels as Columns', () => {
name: 'A',
fields: [
{ name: 'time', type: FieldType.time, values: [1000, 2000] },
{ name: 'Value', type: FieldType.number, values: [1, 2], labels: { location: 'inside', name: 'Request' } },
{
name: 'Value',
type: FieldType.number,
values: [1, 2],
labels: { location: 'inside', name: 'Request' },
config: {
displayName: 'Custom1',
displayNameFromDS: 'Custom2',
},
},
],
});
......
......@@ -51,7 +51,9 @@ export const labelsToFieldsTransformer: DataTransformerInfo<LabelsToFieldsOption
name,
config: {
...field.config,
// we need to clear thes for this transform as these can contain label names that we no longer want
displayName: undefined,
displayNameFromDS: undefined,
},
labels: undefined,
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment