graph.js: add a method to change the dimensions of a graph