+
{chartOptions && (
- {canModifyChart && chartOptions && (
+ {canModifyChart && chartOptions && !isDashboardLocked && (
`
isGraphLegendToggleAvailable ? '50%' : '100%'};
`;
-export const LabelContainer = styled.button<{ isDarkMode?: boolean }>`
+export const LabelContainer = styled.button<{
+ isDarkMode?: boolean;
+ disabled?: boolean;
+}>`
max-width: 18.75rem;
- cursor: pointer;
+ cursor: ${(props): string => (props.disabled ? 'no-drop' : 'pointer')};
border: none;
background-color: transparent;
color: ${(props): string =>
diff --git a/frontend/src/container/GridCardLayout/GridCard/FullView/types.ts b/frontend/src/container/GridCardLayout/GridCard/FullView/types.ts
index 66d6382675..9e976d7bfa 100644
--- a/frontend/src/container/GridCardLayout/GridCard/FullView/types.ts
+++ b/frontend/src/container/GridCardLayout/GridCard/FullView/types.ts
@@ -42,6 +42,7 @@ export interface LabelProps {
labelClickedHandler: (labelIndex: number) => void;
labelIndex: number;
label: string;
+ disabled?: boolean;
}
export interface FullViewProps {
@@ -74,6 +75,7 @@ export interface CheckBoxProps {
index: number;
graphVisibilityState: boolean[];
checkBoxOnChangeHandler: (e: CheckboxChangeEvent, index: number) => void;
+ disabled?: boolean;
}
export interface SaveLegendEntriesToLocalStoreProps {