A result of Haglund implies that the
-bigraded Hilbert series of the space of diagonal harmonics is a
-Ehrhart function of the flow polytope of a complete graph with netflow vector
. We study the
-Ehrhart functions of flow polytopes of threshold graphs with arbitrary netflow vectors. Our results generalize previously known specializations of the mentioned bigraded Hilbert series at
. As a corollary to our results, we obtain a proof of a conjecture of Armstrong, Garsia, Haglund, Rhoades, and Sagan about the
-Ehrhart function of the flow polytope of a complete graph with an arbitrary netflow vector.