mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-15 15:45:56 +08:00
fix: full view chart label and checkbox issue (#3879)
This commit is contained in:
parent
2d60805b28
commit
71e487dc0c
@ -6,10 +6,10 @@ import Label from './Label';
|
|||||||
export const getLabel = (
|
export const getLabel = (
|
||||||
labelClickedHandler: (labelIndex: number) => void,
|
labelClickedHandler: (labelIndex: number) => void,
|
||||||
): ColumnType<DataSetProps> => ({
|
): ColumnType<DataSetProps> => ({
|
||||||
render: (label: string, _, index): JSX.Element => (
|
render: (label, record): JSX.Element => (
|
||||||
<Label
|
<Label
|
||||||
label={label}
|
label={label}
|
||||||
labelIndex={index}
|
labelIndex={record.index}
|
||||||
labelClickedHandler={labelClickedHandler}
|
labelClickedHandler={labelClickedHandler}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
|
@ -20,10 +20,10 @@ export const getGraphManagerTableColumns = ({
|
|||||||
width: 50,
|
width: 50,
|
||||||
dataIndex: ColumnsKeyAndDataIndex.Index,
|
dataIndex: ColumnsKeyAndDataIndex.Index,
|
||||||
key: ColumnsKeyAndDataIndex.Index,
|
key: ColumnsKeyAndDataIndex.Index,
|
||||||
render: (_: string, __: DataSetProps, index: number): JSX.Element => (
|
render: (_: string, record: DataSetProps): JSX.Element => (
|
||||||
<CustomCheckBox
|
<CustomCheckBox
|
||||||
data={data}
|
data={data}
|
||||||
index={index}
|
index={record.index}
|
||||||
checkBoxOnChangeHandler={checkBoxOnChangeHandler}
|
checkBoxOnChangeHandler={checkBoxOnChangeHandler}
|
||||||
graphVisibilityState={graphVisibilityState}
|
graphVisibilityState={graphVisibilityState}
|
||||||
/>
|
/>
|
||||||
|
@ -59,20 +59,21 @@ function WidgetGraphComponent({
|
|||||||
[data, name],
|
[data, name],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const [graphsVisibilityStates, setGraphsVisibilityStates] = useState<
|
||||||
|
boolean[]
|
||||||
|
>(localStoredVisibilityStates);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!lineChartRef.current) return;
|
if (!lineChartRef.current) return;
|
||||||
|
|
||||||
localStoredVisibilityStates.forEach((state, index) => {
|
localStoredVisibilityStates.forEach((state, index) => {
|
||||||
lineChartRef.current?.toggleGraph(index, state);
|
lineChartRef.current?.toggleGraph(index, state);
|
||||||
});
|
});
|
||||||
|
setGraphsVisibilityStates(localStoredVisibilityStates);
|
||||||
}, [localStoredVisibilityStates]);
|
}, [localStoredVisibilityStates]);
|
||||||
|
|
||||||
const { setLayouts, selectedDashboard, setSelectedDashboard } = useDashboard();
|
const { setLayouts, selectedDashboard, setSelectedDashboard } = useDashboard();
|
||||||
|
|
||||||
const [graphsVisibilityStates, setGraphsVisibilityStates] = useState<
|
|
||||||
boolean[]
|
|
||||||
>(localStoredVisibilityStates);
|
|
||||||
|
|
||||||
const { featureResponse } = useSelector<AppState, AppReducer>(
|
const { featureResponse } = useSelector<AppState, AppReducer>(
|
||||||
(state) => state.app,
|
(state) => state.app,
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user