Fix graph data sorting bug + preview UI improvements