Added user interaction to sort the visualisation