refactor graph styling structure