WIP: Brush funktioniert in Chart, aber soll Datum in Brush angezeigt
This commit is contained in:
19
redux/slices/brushSlice.ts
Normal file
19
redux/slices/brushSlice.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
// brushSlice.ts (✅ Korrekt)
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
|
||||
const brushSlice = createSlice({
|
||||
name: "brush",
|
||||
initialState: {
|
||||
startIndex: 0,
|
||||
endIndex: 0,
|
||||
},
|
||||
reducers: {
|
||||
setBrushRange(state, action) {
|
||||
state.startIndex = action.payload.startIndex;
|
||||
state.endIndex = action.payload.endIndex;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { setBrushRange } = brushSlice.actions;
|
||||
export default brushSlice.reducer;
|
||||
Reference in New Issue
Block a user