Transforms: GroupToMatrix transform should retain keyRowField config (#109066)
This commit is contained in:
@@ -21,7 +21,7 @@ describe('Grouping to Matrix', () => {
|
||||
const seriesA = toDataFrame({
|
||||
name: 'A',
|
||||
fields: [
|
||||
{ name: 'Time', type: FieldType.time, values: [1000, 1001, 1002] },
|
||||
{ name: 'Time', type: FieldType.time, values: [1000, 1001, 1002], config: { interval: 60000 } },
|
||||
{ name: 'Value', type: FieldType.number, values: [1, 2, 3] },
|
||||
],
|
||||
});
|
||||
@@ -33,7 +33,9 @@ describe('Grouping to Matrix', () => {
|
||||
name: 'Time\\Time',
|
||||
type: FieldType.time,
|
||||
values: [1000, 1001, 1002],
|
||||
config: {},
|
||||
config: {
|
||||
interval: 60000,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '1000',
|
||||
|
||||
@@ -108,7 +108,7 @@ export const groupingToMatrixTransformer: DataTransformerInfo<GroupingToMatrixTr
|
||||
name: rowColumnField,
|
||||
values: rowValues,
|
||||
type: keyRowField.type,
|
||||
config: {},
|
||||
config: { ...keyRowField.config },
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user