In 2008, Chen and Chvátal conjectured that in every finite metric space of points, there are at least distinct lines, or the whole set of points is a line. This is a generalization of a classical result in the Euclidean plane. The Chen-Chvátal conjecture is open even in metric spaces induced by connected graphs. In 2018, it was asked by Chvátal whether graphs of diameter three satisfy the conjecture. In this work, we find all graphs of diameter three having fewer lines than vertices. As a direct consequence, we prove that graphs of diameter three satisfy the Chen-Chvátal conjecture.