added dynamic input based on graph
This commit is contained in:
@@ -6,15 +6,15 @@ interface Measurement {
|
||||
}
|
||||
|
||||
interface MeasurementStore {
|
||||
measurements: Measurement[];
|
||||
measurements: Record<string, Measurement>; // Change array to Record<string, Measurement>
|
||||
interval: number;
|
||||
duration: string;
|
||||
setMeasurements: (newMeasurements: Measurement[]) => void;
|
||||
setMeasurements: (newMeasurements: Record<string, Measurement>) => void;
|
||||
updateDuration: (newDuration: string) => void;
|
||||
}
|
||||
|
||||
const useChartStore = create<MeasurementStore>((set) => ({
|
||||
measurements: [],
|
||||
measurements: {}, // Initialize as an empty object
|
||||
interval: 1000,
|
||||
duration: "1h",
|
||||
|
||||
@@ -26,3 +26,4 @@ const useChartStore = create<MeasurementStore>((set) => ({
|
||||
}));
|
||||
|
||||
export default useChartStore;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user