can pass graph type string (line column, area) to buildGraph()