If I'm understanding your use case correctly, I think a scripted field would solve the problem.
You could create a scripted field called time_connected
:
doc.['end_connection'].value - doc.['begin_connection'].value
And then you could visualize this field in the Visualize tab. If that's not what you're looking for, please provide more details on what you're trying to achieve.