Generate flow chart