In recent years, the X-ray interferometer using dual phase gratings has been reported by a lot of researchers. The large periodic fringes produced by the X-ray interferometer using dual phase gratings can be directly detected by ordinary detectors. At the same time, the X-ray interferometer using dual phase gratings can reduce the radiation dose of the sample without using absorption gratings. Meanwhile, a high fringe visibility is always preferred to achieve a high signal-to-noise ratio for X-ray grating interferometry. However, recent studies have reported that experimental fringe visibility in X-ray interferometer using dual rectangular phase gratings is relatively low. Therefore, it is necessary to further increase the fringe visibility in X-ray interferometry using dual phase gratings. This work focuses on the analysis of fringe visibility in X-ray interferometer using dual triangular phase gratings. Based on the fringe intensity distribution formula of X-ray dual phase grating interferometer, the fringe visibility of the dual triangular phase grating interferometer is investigated as a function of the grating spacing under monochromatic and different polychromatic illumination, respectively. As a comparison, the fringe visibility of the dual rectangular phase grating interferometer was also studied under the same condition. The results show that the maximum fringe visibility of the dual triangular phase grating interferometer increases with an increase with the phase shift regardless of monochromatic or polychromatic illumination. Under monochromatic illumination, the maximum fringe visibility of dual 5<i>π</i>/2 triangular phase gratings is about 21% higher than that of dual rectangular phase gratings. Under different polychromatic illumination, the fringe visibility of dual 5<i>π</i>/2 triangular phase gratings is at least 23% higher than that of dual rectangular phase gratings. Under polychromatic illumination, when the average energy of X-ray deviates from the design energy of grating more, the maximum fringe visibility of the dual phase grating interferometer decreases greater. In addition, with the increase of the focal size of the X-ray source, the maximum fringe visibility of the dual phase grating interferometer decreases, under polychromatic illumination. We hope that those results can be used as guidelines for design and optimization of X-ray interferometer using dual triangular phase gratings.