Allow the graph type to be specified when using the graph widget