Panels: Use the No value option when showing the no data message (#47675)

* Performance: Create separate div for portal root to limit reflow -> recalc style

* refactoring

* NoData: Use field config No value option as text when display no data message

* Use PanelDataErrorView in TabelPanel

* Add PanelDataErrorView to PieChart

* Updated
This commit is contained in:
Torkel Ödegaard
2022-04-14 10:10:03 +02:00
committed by GitHub
parent aceedb3a32
commit e3590e1a9b
11 changed files with 108 additions and 18 deletions

View File

@@ -36,7 +36,15 @@ export const TimeSeriesPanel: React.FC<TimeSeriesPanelProps> = ({
const frames = useMemo(() => prepareGraphableFields(data.series, config.theme2), [data]);
if (!frames) {
return <PanelDataErrorView panelId={id} data={data} needsTimeField={true} needsNumberField={true} />;
return (
<PanelDataErrorView
panelId={id}
fieldConfig={fieldConfig}
data={data}
needsTimeField={true}
needsNumberField={true}
/>
);
}
const enableAnnotationCreation = Boolean(canAddAnnotations && canAddAnnotations());