mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DataFrame: Add explicit histogram frame type (panel & transforms) (#61195)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user