improve variables in graph, to correct see when resize canvas