My JSON structure looks as follows with more than a million records with the same format with different starttime, endtime and setupnames.
{
"owner": "Robert",
"starttime": "2017-12-05T13:24:12.000Z",
"SetupName": "OA1125",
"endtime": "2017-12-05T18:24:12.000Z",
},
{
"owner": "Robert",
"starttime": "2017-12-05T18:24:12.000Z",
"SetupName": "OA1125",
"endtime": "2017-12-05T23:25:12.000Z",
}
I am trying to create a bar chart visualization with total hours spent against each SetupName by calculating the difference between EndTime - StartTime and aggregate over all records.
For Example from the above mentioned JSON the total hours of OA1125 is 10 hours ( 5 hours each from each json ), similar for other setupnames.
The bar chart visualization will be like
Yaxis - SetupName
Xaxis - Hours
OA1125 : ========== 10 hours
OA1126 : == 2 hours
OA1127 : ===== 5 hours