generate graph from ui