integrate graph in main view