putting the graph inside of hte main svg, sorting the list based on perameters