Add function sort + improve svg generated for axis