mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
TimeSeries: update frame.length when syncing bar widths (#48223)
This commit is contained in:
parent
eef22c05e1
commit
fe7b594bbd
@ -499,7 +499,7 @@ describe('GraphNG utils', () => {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"length": 10,
|
"length": 12,
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
|
@ -13,7 +13,9 @@ import { nullToUndefThreshold } from './nullToUndefThreshold';
|
|||||||
import { XYFieldMatchers } from './types';
|
import { XYFieldMatchers } from './types';
|
||||||
|
|
||||||
function isVisibleBarField(f: Field) {
|
function isVisibleBarField(f: Field) {
|
||||||
return f.config.custom?.drawStyle === GraphDrawStyle.Bars && !f.config.custom?.hideFrom?.viz;
|
return (
|
||||||
|
f.type === FieldType.number && f.config.custom?.drawStyle === GraphDrawStyle.Bars && !f.config.custom?.hideFrom?.viz
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// will mutate the DataFrame's fields' values
|
// will mutate the DataFrame's fields' values
|
||||||
@ -105,6 +107,8 @@ export function preparePlotFrame(frames: DataFrame[], dimFields: XYFieldMatchers
|
|||||||
vals.push(undefined, undefined);
|
vals.push(undefined, undefined);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
alignedFrame.length += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
return alignedFrame;
|
return alignedFrame;
|
||||||
|
Loading…
Reference in New Issue
Block a user