Explore: Refactor graph component to use PanelRenderer (#38914)

* Move SplitOpenFn type to grafana-data

* Use panel renderer instead of Timeseries panel for graph in Explore

* rename splitopen props on panel context
This commit is contained in:
Zoltán Bedi
2021-09-10 18:18:22 +02:00
committed by GitHub
parent ddd110d0b2
commit 94f1173824
12 changed files with 67 additions and 75 deletions

View File

@@ -23,10 +23,10 @@ export const TimeSeriesPanel: React.FC<TimeSeriesPanelProps> = ({
onChangeTimeRange,
replaceVariables,
}) => {
const { sync, canAddAnnotations } = usePanelContext();
const { sync, canAddAnnotations, onSplitOpen } = usePanelContext();
const getFieldLinks = (field: Field, rowIndex: number) => {
return getFieldLinksForExplore({ field, rowIndex, range: timeRange });
return getFieldLinksForExplore({ field, rowIndex, splitOpenFn: onSplitOpen, range: timeRange });
};
const { frames, warn } = useMemo(() => prepareGraphableFields(data?.series, config.theme2), [data]);