refactor for graph fragment, add settings layout