I have an es index which contains the documents to indicate the time spent in seconds by an user in an activity like the one below
{ "UserName" : "User1", "Activity" : "Interacting", "TimeSpent" : 50 }
I need to visualize the total time spent by each user in every activity. I am able to create the chart with the sum and term aggregation.
But I have a requirement to show the time spent in minutes instead of seconds (Y- axis). I tried to convert the data before aggregation by using a scripted field. But the data is lost when trying to convert seconds to minutes(50 seconds converted to 0 minutes).
I need to find a way where I can sum all the seconds of time spent and then convert it into minutes. Is there a way I can achieve this ?