DataFrame: Add explicit histogram frame type (panel & transforms) (#61195)

This commit is contained in:
Leon Sorokin
2023-01-10 17:42:45 -06:00
committed by GitHub
parent 86b5fbbf60
commit be1c5e13d5
7 changed files with 865 additions and 467 deletions

View File

@@ -16,6 +16,20 @@ export const HistogramPanel = ({ data, options, width, height }: Props) => {
if (!data?.series?.length) {
return undefined;
}
// stamp origins for legend's calcs (from raw values)
data.series.forEach((frame, frameIndex) => {
frame.fields.forEach((field, fieldIndex) => {
field.state = {
...field.state,
origin: {
frameIndex,
fieldIndex,
},
};
});
});
if (data.series.length === 1) {
const info = getHistogramFields(data.series[0]);
if (info) {