Improve the function to draw graph of duration
Merge branch 'improve_drawing_graph'