mirror of
https://github.com/grafana/grafana.git
synced 2025-01-01 11:47:05 -06:00
Histogram: Fix crash when state was undefined (when combine was enabled) (#34514)
This commit is contained in:
parent
aa14621d29
commit
d0769397b2
@ -285,16 +285,18 @@ func getPanelSort(id string) int {
|
||||
sort = 10
|
||||
case "status-grid":
|
||||
sort = 11
|
||||
case "graph":
|
||||
case "histogram":
|
||||
sort = 12
|
||||
case "text":
|
||||
case "graph":
|
||||
sort = 13
|
||||
case "alertlist":
|
||||
case "text":
|
||||
sort = 14
|
||||
case "dashlist":
|
||||
case "alertlist":
|
||||
sort = 15
|
||||
case "news":
|
||||
case "dashlist":
|
||||
sort = 16
|
||||
case "news":
|
||||
sort = 17
|
||||
}
|
||||
return sort
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ export const VisualizationSelectPane: FC<Props> = ({ panel }) => {
|
||||
const match = filterPluginList(plugins, query, plugin.meta);
|
||||
|
||||
if (match && match.length) {
|
||||
onPluginTypeChange(match[0], true);
|
||||
onPluginTypeChange(match[0], false);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -123,7 +123,8 @@ const prepConfig = (frame: DataFrame, theme: GrafanaTheme2) => {
|
||||
for (let i = 2; i < frame.fields.length; i++) {
|
||||
const field = frame.fields[i];
|
||||
|
||||
field.state!.seriesIndex = seriesIndex++;
|
||||
field.state = field.state ?? {};
|
||||
field.state.seriesIndex = seriesIndex++;
|
||||
|
||||
const customConfig = { ...field.config.custom };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user