The earlier part of the question concerns the diameter of the coil spring, d in the diagram.
the later part of the question concerns the diameter of the wire the spring is made out of...
it's about two separate diameters,
1. the diameter of the coil, d in the first picture
2. the diameter of the wire the coil is made from - shown in the second picture.