From fef97269aed8f9bdbd01235264a9ff519bec9881 Mon Sep 17 00:00:00 2001 From: Devanshu Rastogi Date: Wed, 4 Dec 2024 13:58:41 +0530 Subject: [PATCH] Added loading state in pie chart. (#11404) --- .../Inspector/Components/Chart.jsx | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/frontend/src/AppBuilder/RightSideBar/Inspector/Components/Chart.jsx b/frontend/src/AppBuilder/RightSideBar/Inspector/Components/Chart.jsx index ebe03675e7..fe6c33341b 100644 --- a/frontend/src/AppBuilder/RightSideBar/Inspector/Components/Chart.jsx +++ b/frontend/src/AppBuilder/RightSideBar/Inspector/Components/Chart.jsx @@ -181,22 +181,25 @@ class Chart extends React.Component { ), }); } + } - items.push({ - title: 'Options', - children: ( - <> - {renderElement( - component, - componentMeta, - paramUpdated, - dataQueries, - 'loadingState', - 'properties', - currentState - )} - {renderElement(component, componentMeta, paramUpdated, dataQueries, 'showAxes', 'properties', currentState)} - {renderElement( + items.push({ + title: 'Options', + children: ( + <> + {renderElement( + component, + componentMeta, + paramUpdated, + dataQueries, + 'loadingState', + 'properties', + currentState + )} + {chartType !== 'pie' && + renderElement(component, componentMeta, paramUpdated, dataQueries, 'showAxes', 'properties', currentState)} + {chartType !== 'pie' && + renderElement( component, componentMeta, paramUpdated, @@ -205,10 +208,9 @@ class Chart extends React.Component { 'properties', currentState )} - - ), - }); - } + + ), + }); items.push({ title: 'Events',