Add the values depending on the selection criteria
问题 I want to add random values, depending on the criterion, for example if I choose "Loans" and in the second criterion "Week" I would like the total summed values to be shown in the table in a week, that is to say 7 days, the same if the chosen criterion was 1 month, the total values would be in 31 days. Values are random because this is not in a database. const sampleData = { "0": [30, 2, 18, 6], "1": [435, 234, 38, 84], "2": [464, 34, 49, 33], "3": [342, 96, 60, 74], }; const setValues