It is often glossed over in calculations like these that you actually have to calculate the flux through every side of a Gaussian surface. There are three 'different' surfaces in this case. The two caps and the cylinder itself. The vector [itex]d\vec{s}[/itex] is always perpendicular to the surface. For the two caps this means you have to draw them as they are drawn in the picture. The directions are of course reversed.
For the cilinder the vector [itex]d\vec{s}[/itex] is the one you have drawn, the radial vector. This one is perpendicular to the surface of the cylinder at any point. The reason why this one usually doesn't get drawn or taken into account is that the electric field is perpendicular to ds in this case, which means [itex]\vec{E} \cdot d\vec{s}=0[/itex].