I would be cautious to answer this question. I think that successions were often messier than simply either elective or hereditary. A good example of this messiness was the Carolingians. "Frankish custom" held that the king was elected by the nobility, but Pippin III is able to get a grant from the Pope that states that only members of his family can inherit the throne (this is contained in a document known as the Clausula de unctione Pippini regis Francorum which is dated to 757, three years after he is crowned king, so there is some debate as to its legitimacy). Anyways, which one was it? Were further Frankish kings elected by the nobility, or were they all Carolingians?
The answer is both, kinda. Essentially what ends up happening is the nobility does in some sense elect or have to approve the future monarch, but they also make sure they are always a Carolingian. In other words, while the aristocracy was not powerless, they recognized that a legitimate ruler needed to be a Carolingian. Because of this major aristocratic revolts center around outcast Carolingian family members. The first being Charlemagne's son Pippin "the Hunchback" in the second half of the eighth century. He had been overlooked for succession, but was able to gather significant aristocratic support to his cause which led to an uprising. However, the Frankish aristocrats do eventually choose someone who is not a Carolingian. This was Odo of Paris, who was elected as the successor to the Carolingian Charles the Fat. After this point, the aristocracy does seem to go outside the Carolingian line to choose their monarchs (in the West Frankish Kingdom that is).
My point in all of this is that the idea of a straight dichotomy between elective and hereditary monarchies can erase some of the dynamism and reciprocity embodied in early Frankish polities (my specialty is Francia, so I would love to hear other regions/time periods). Also hopefully I've shown that the two are not necessarily mutually exclusive. In many ways the Frankish monarchy was both elective and hereditary.
Edit: Actually formatted it
Hi! History major with a concentration in Byzantine studies here.
While I can't speak much for Western Europe, in the Eastern Roman Empire (Byzantium), hereditary succession was technically prohibited by the law, descending from the Roman opposition to the ancient Kings of Rome (pre-Republic). Now, of course there were dynasties, but the new emperor had to be crowned by the Senate. What usually happened in peaceful successions was a declaration of the chosen heir, dynastically related or not, as co-emperor. For example, the emperor Leo III of the Isaurian dynasty had the Senate crown Constantine V co-emperor, then when Leo died, Constantine became sole emperor. In this manner, the veneer of an elective government was maintained.
However, this method fell apart frequently, particularly when the Emperor either did not have an heir crowned as co-emperor or when there was alleged illegitimacy or misrule. The people of the capital, Constantinople, or the soldiers of an army, would often "elect" a new emperor (usually a noble or general) to be the "legitimate emperor." In this manner, Justinian the Great was almost overthrown, and the Angelos dynasty deposed the Kommenians and each other.
Lastly, the imperial princesses, mothers, and regents, beginning in particular with the Empress Irene, were used as a means to legitimacy for a non-dynastic emperor. This happened in the 11th century with the Macedonian dynasty members Zoe and Theodora. Irene is also a good example of a powerful Empress-Regent ruling through her son (Michael), and ultimately by her own right.
To sum up: hereditary monarchy was technically prohibited. The Roman tradition of "electing" a leader via Senate, urban mob, or army was half of the legitimacy factor, the other half being relation to the previous emperor. Generally the Byzantine empire was stable when an emperor had a strong successor crowned co-emperor, and so on. However, when there was a weak successor, the dynasty would often fall apart. Many of the best emperors started their own dynasties by coups and murders: Basil I and Alexios I. Hope that provides a Byzantine perspective!
EDIT: Sources
Geanakoplos, Deno John. Byzantium: Church, Society, and Civilization Seen through Contemporary Eyes (1986)
Herrin, Judith. Women in Purple: Rulers of Medieval Byzantium (2004).
Norwich, John Julius. A Short History of Byzantium (1997).