Add a try catch to display_graph
change graph init variable to be able to have multiple graph in the same page
Reinitialize some variable depending on graph width when resizing