A sanguine person, in the strict sense the doctrine intended, was not a cheerful person but a person in whom blood predominated. The physical signs came first: a ruddy complexion, a full habit of body, a strong pulse, warm skin. The character was held to follow from the physiology rather than to stand on its own, and a physician who judged a patient sanguine was making a claim about the body before making one about the disposition.
Astrological medicine took the scheme up and attached it to the planets, giving the sanguine complexion to Jupiter, whose traditional qualities of heat and moisture match it exactly. Practitioners such as William Lilly, writing in seventeenth century England, judged a person's complexion from the birth chart and used the judgement in medical and ordinary questions alike, so the temperament became something read off a birth time as well as observed at a bedside.
What survives in English is the character and not the physiology. Sanguine now means optimistic and confident about an outcome, with no implication about anybody's blood, and it is the only one of the four whose modern sense has drifted almost wholly to the positive. Cheerfulness was never the whole of it for the older writers, who paired the complexion with a tendency to be changeable, to promise more than was delivered and to lose interest before a thing was finished. The narrowing to plain good humour is a modern simplification of a portrait that had a shadow in it.
Sources Christian AstrologyWilliam Lilly with On the Affected Parts / On My Own Opinions (Galenic corpus, reference synthesis)Galen; reference synthesis by Wikipedia contributors