mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 18:39:04 +08:00
fix: pie chart panels not rendering (#5376)
* fix: pie chart panels not rendering * fix: restructure code
This commit is contained in:
parent
fd603b8fdf
commit
b34509215e
@ -81,7 +81,7 @@ function FullView({
|
||||
globalSelectedInterval: globalSelectedTime,
|
||||
variables: getDashboardVariables(selectedDashboard?.data.variables),
|
||||
fillGaps: widget.fillSpans,
|
||||
formatForWeb: getGraphType(widget.panelTypes) === PANEL_TYPES.TABLE,
|
||||
formatForWeb: widget.panelTypes === PANEL_TYPES.TABLE,
|
||||
};
|
||||
}
|
||||
updatedQuery.builder.queryData[0].pageSize = 10;
|
||||
|
@ -109,7 +109,7 @@ function GridCardGraph({
|
||||
globalSelectedInterval,
|
||||
variables: getDashboardVariables(variables),
|
||||
fillGaps: widget.fillSpans,
|
||||
formatForWeb: getGraphType(widget.panelTypes) === PANEL_TYPES.TABLE,
|
||||
formatForWeb: widget.panelTypes === PANEL_TYPES.TABLE,
|
||||
};
|
||||
}
|
||||
updatedQuery.builder.queryData[0].pageSize = 10;
|
||||
|
@ -12,7 +12,7 @@ import { memo, useEffect, useState } from 'react';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { AppState } from 'store/reducers';
|
||||
import { GlobalReducer } from 'types/reducer/globalTime';
|
||||
import { getGraphType } from 'utils/getGraphType';
|
||||
import { getGraphType, getGraphTypeForFormat } from 'utils/getGraphType';
|
||||
|
||||
import { WidgetGraphProps } from '../types';
|
||||
import ExplorerColumnsRenderer from './ExplorerColumnsRenderer';
|
||||
@ -45,7 +45,7 @@ function LeftContainer({
|
||||
query: stagedQuery || initialQueriesMap.metrics,
|
||||
globalSelectedInterval,
|
||||
formatForWeb:
|
||||
getGraphType(selectedGraph || selectedWidget.panelTypes) ===
|
||||
getGraphTypeForFormat(selectedGraph || selectedWidget.panelTypes) ===
|
||||
PANEL_TYPES.TABLE,
|
||||
variables: getDashboardVariables(selectedDashboard?.data.variables),
|
||||
};
|
||||
@ -77,7 +77,7 @@ function LeftContainer({
|
||||
query: stagedQuery,
|
||||
fillGaps: selectedWidget.fillSpans || false,
|
||||
formatForWeb:
|
||||
getGraphType(selectedGraph || selectedWidget.panelTypes) ===
|
||||
getGraphTypeForFormat(selectedGraph || selectedWidget.panelTypes) ===
|
||||
PANEL_TYPES.TABLE,
|
||||
}));
|
||||
}
|
||||
|
@ -10,3 +10,6 @@ export const getGraphType = (panelType: PANEL_TYPES): PANEL_TYPES => {
|
||||
}
|
||||
return panelType;
|
||||
};
|
||||
|
||||
export const getGraphTypeForFormat = (panelType: PANEL_TYPES): PANEL_TYPES =>
|
||||
panelType;
|
||||
|
Loading…
x
Reference in New Issue
Block a user