{
// Wrap everything in a check to ensure the vis library is loaded
// This helps prevent errors if the OJS code runs before the external script is ready
if (typeof vis === 'undefined' || typeof vis.DataSet === 'undefined') {
console.error("vis-timeline library (vis object) not found or not ready. Timeline cannot be created.");
// Attempt to display an error message directly in the placeholder div
const errorDiv = document.getElementById("visualization");
if (errorDiv) {
errorDiv.innerHTML = '<p style="color: red; padding: 1em; border: 1px solid red;">Error: The timeline library (vis.js) failed to load or initialize before the visualization code could run. Please check the browser console (F12) for related errors (like network issues loading the script) and ensure the library URL in the YAML header is correct.</p>';
}
// You might return an HTML object in OJS to signal an error state if needed elsewhere
// html`<p style="color: red;">Error: vis.js library not loaded.</p>`
} else {
// If we reach here, 'vis' and 'vis.DataSet' should be defined.
console.log("vis library found. Proceeding to create timeline..."); // Add a success log for debugging
// Define groups
const groups = new vis.DataSet([
{
id: "events",
content: "",
},
{
id: "normandy",
content: "House of Normandy",
},
{
id: "plantagenet",
content: "House of Plantagenet",
},
{
id: "lancaster",
content: "House of Lancaster",
},
{
id: "york",
content: "House of York",
},
]);
// Define items
const items = new vis.DataSet([
// Normandy
// Stephen
{
id: "stephen_reign",
content: " ",
start: "1135-12-22",
end: "1154-10-25",
group: "normandy",
subgroup: "stephen",
className: "reign",
title: "<b>Stephen (Stephen of Blois)</b><br>Lifespan: ~1092/1096 to 25 Oct 1154<br>Reign: 22 Dec 1135 to 25 Oct 1154<br>Claim to throne: Nephew of Henry I; seized throne upon Henry I's death<br>despite Henry designating his daughter Matilda as heir.<br>Major events:<br>• The Anarchy (civil war against Empress Matilda)<br>• Treaty of Wallingford (1153) designating Henry II as heir",
},
{
id: "stephen_prereign",
content: "Stephen",
start: "1096-01-01", // Approx birth year
end: "1135-12-22",
group: "normandy",
subgroup: "stephen",
className: "prereign",
title: "<b>Stephen (Stephen of Blois)</b><br>Lifespan: ~1092/1096 to 25 Oct 1154<br>Reign: 22 Dec 1135 to 25 Oct 1154<br>Claim to throne: Nephew of Henry I; seized throne upon Henry I's death<br>despite Henry designating his daughter Matilda as heir.<br>Major events:<br>• The Anarchy (civil war against Empress Matilda)<br>• Treaty of Wallingford (1153) designating Henry II as heir",
},
// Henry I
{
id: "henry_i_reign",
content: " ",
start: "1100-08-05",
end: "1135-12-01",
group: "normandy",
subgroup: "henry_i",
className: "reign",
title: "<b>Henry I (Henry Beauclerc)</b><br>Lifespan: ~1068 to 1 Dec 1135<br>Reign: 5 Aug 1100 to 1 Dec 1135<br>Claim to throne: Youngest son of William I; seized throne after death of William II<br>while elder brother Robert Curthose was on crusade.<br>Major events:<br>• Charter of Liberties (1100)<br>• Defeated brother Robert Curthose at Battle of Tinchebray (1106)<br>• Loss of son William Adelin in White Ship disaster (1120)<br>• Designated daughter Empress Matilda as heir",
},
{
id: "henry_i_prereign",
content: "Henry I",
start: "1068-01-01", // Approx birth year
end: "1100-08-05",
group: "normandy",
subgroup: "henry_i",
className: "prereign",
title: "<b>Henry I (Henry Beauclerc)</b><br>Lifespan: ~1068 to 1 Dec 1135<br>Reign: 5 Aug 1100 to 1 Dec 1135<br>Claim to throne: Youngest son of William I; seized throne after death of William II<br>while elder brother Robert Curthose was on crusade.<br>Major events:<br>• Charter of Liberties (1100)<br>• Defeated brother Robert Curthose at Battle of Tinchebray (1106)<br>• Loss of son William Adelin in White Ship disaster (1120)<br>• Designated daughter Empress Matilda as heir",
},
// William II
{
id: "william_ii_reign",
content: " ",
start: "1087-09-26",
end: "1100-08-02",
group: "normandy",
subgroup: "william_ii",
className: "reign",
title: "<b>William II (William Rufus)</b><br>Lifespan: ~1056/1060 to 2 Aug 1100<br>Reign: 26 Sep 1087 to 2 Aug 1100<br>Claim to throne: Third son of William I;<br>nominated by William I on his deathbed over eldest son Robert Curthose.<br>Major events:<br>• Rebellion of 1088 (supported by uncle Odo of Bayeux)<br>• Conflicts with brother Robert Curthose (Duke of Normandy)<br>• Conflicts with Archbishop Anselm of Canterbury<br>• Died in a hunting accident in the New Forest",
},
{
id: "william_ii_prereign",
content: "William II",
start: "1057-01-01", // Approx birth year
end: "1087-09-26", // Use reign start date
group: "normandy",
subgroup: "william_ii",
className: "prereign",
title: "<b>William II (William Rufus)</b><br>Lifespan: ~1056/1060 to 2 Aug 1100<br>Reign: 26 Sep 1087 to 2 Aug 1100<br>Claim to throne: Third son of William I;<br>nominated by William I on his deathbed over eldest son Robert Curthose.<br>Major events:<br>• Rebellion of 1088 (supported by uncle Odo of Bayeux)<br>• Conflicts with brother Robert Curthose (Duke of Normandy)<br>• Conflicts with Archbishop Anselm of Canterbury<br>• Died in a hunting accident in the New Forest",
},
// William I
{
id: "william_i_reign",
content: "👑",
start: "1066-12-25",
end: "1087-09-09",
group: "normandy",
subgroup: "william_i",
className: "reign",
title: "<b>William I (William the Conqueror)</b><br>Lifespan: ~1028 to 9 Sep 1087<br>Reign: 25 Dec 1066 to 9 Sep 1087<br>Claim to throne: Duke of Normandy; claimed throne promised by Edward the Confessor,<br>defeated Harold Godwinson at Battle of Hastings.<br>Major events:<br>• Norman Conquest of England (1066)<br>• Harrying of the North (1069–1070)<br>• Compilation of the Domesday Book (1086)<br>• Construction of numerous castles (e.g., Tower of London)",
},
{
id: "william_i_prereign",
content: "William I",
start: "1028-01-01", // Approx birth year
end: "1066-12-25",
group: "normandy",
subgroup: "william_i",
className: "prereign",
title: "<b>William I (William the Conqueror)</b><br>Lifespan: ~1028 to 9 Sep 1087<br>Reign: 25 Dec 1066 to 9 Sep 1087<br>Claim to throne: Duke of Normandy; claimed throne promised by Edward the Confessor,<br>defeated Harold Godwinson at Battle of Hastings.<br>Major events:<br>• Norman Conquest of England (1066)<br>• Harrying of the North (1069–1070)<br>• Compilation of the Domesday Book (1086)<br>• Construction of numerous castles (e.g., Tower of London)",
},
// House of Plantagenet
// Richard II
{
id: "richard_ii_reign",
content: " ",
start: "1377-06-22",
end: "1399-09-29",
group: "plantagenet",
subgroup: "richard_ii",
className: "reign",
title: "<b>Richard II</b><br>Lifespan: 6 Jan 1367 to ~14 Feb 1400<br>Reign: 22 Jun 1377 to 29 Sep 1399<br>Claim to throne: Grandson of Edward III;<br>succeeded his grandfather as his father, Edward the Black Prince, predeceased Edward III.<br>Major events:<br>• Peasants' Revolt (1381)<br>• Conflicts with the Lords Appellant<br>• Patronage of arts (e.g., Chaucer, Gower)<br>• Deposed by his cousin Henry Bolingbroke (Henry IV)",
},
{
id: "richard_ii_prereign",
content: "Richard II",
start: "1367-01-06",
end: "1377-06-22",
group: "plantagenet",
subgroup: "richard_ii",
className: "prereign",
title: "<b>Richard II</b><br>Lifespan: 6 Jan 1367 to ~14 Feb 1400<br>Reign: 22 Jun 1377 to 29 Sep 1399<br>Claim to throne: Grandson of Edward III;<br>succeeded his grandfather as his father, Edward the Black Prince, predeceased Edward III.<br>Major events:<br>• Peasants' Revolt (1381)<br>• Conflicts with the Lords Appellant<br>• Patronage of arts (e.g., Chaucer, Gower)<br>• Deposed by his cousin Henry Bolingbroke (Henry IV)",
},
// Edward III
{
id: "edward_iii_reign",
content: " ",
start: "1327-01-25",
end: "1377-06-21",
group: "plantagenet",
subgroup: "edward_iii",
className: "reign",
title: "<b>Edward III</b><br>Lifespan: 13 Nov 1312 to 21 Jun 1377<br>Reign: 25 Jan 1327 to 21 Jun 1377<br>Claim to throne: Eldest son of Edward II;<br>became king after his father was deposed.<br>Major events:<br>• Start of the Hundred Years' War (claimed French throne 1337)<br>• English victories at Battle of Crécy (1346) and Poitiers (1356)<br>• Black Death arrives in England (1348)<br>• Order of the Garter founded (~1348)",
},
{
id: "edward_iii_prereign",
content: "Edward III",
start: "1312-11-13",
end: "1327-01-25",
group: "plantagenet",
subgroup: "edward_iii",
className: "prereign",
title: "<b>Edward III</b><br>Lifespan: 13 Nov 1312 to 21 Jun 1377<br>Reign: 25 Jan 1327 to 21 Jun 1377<br>Claim to throne: Eldest son of Edward II;<br>became king after his father was deposed.<br>Major events:<br>• Start of the Hundred Years' War (claimed French throne 1337)<br>• English victories at Battle of Crécy (1346) and Poitiers (1356)<br>• Black Death arrives in England (1348)<br>• Order of the Garter founded (~1348)",
},
// Edward II
{
id: "edward_ii_reign",
content: " ",
start: "1307-07-07", // Father died 7th, proclaimed 8th
end: "1327-01-25",
group: "plantagenet",
subgroup: "edward_ii",
className: "reign",
title: "<b>Edward II (Edward of Caernarfon)</b><br>Lifespan: 25 Apr 1284 to ~21 Sep 1327<br>Reign: 8 Jul 1307 to 25 Jan 1327<br>Claim to throne: Eldest surviving son of Edward I.<br>Major events:<br>• Conflicts with barons (Ordinances of 1311, Piers Gaveston)<br>• Defeat by Scots at Battle of Bannockburn (1314)<br>• Rise and fall of the Despensers<br>• Deposed by his wife Isabella of France and Roger Mortimer",
},
{
id: "edward_ii_prereign",
content: "Edward II",
start: "1284-04-25",
end: "1307-07-07", // Father's death date
group: "plantagenet",
subgroup: "edward_ii",
className: "prereign",
title: "<b>Edward II (Edward of Caernarfon)</b><br>Lifespan: 25 Apr 1284 to ~21 Sep 1327<br>Reign: 8 Jul 1307 to 25 Jan 1327<br>Claim to throne: Eldest surviving son of Edward I.<br>Major events:<br>• Conflicts with barons (Ordinances of 1311, Piers Gaveston)<br>• Defeat by Scots at Battle of Bannockburn (1314)<br>• Rise and fall of the Despensers<br>• Deposed by his wife Isabella of France and Roger Mortimer",
},
// Edward I
{
id: "edward_i_reign",
content: " ",
start: "1272-11-20",
end: "1307-07-07",
group: "plantagenet",
subgroup: "edward_i",
className: "reign",
title: "<b>Edward I (Longshanks)</b><br>Lifespan: 17 Jun 1239 to 7 Jul 1307<br>Reign: 20 Nov 1272 to 7 Jul 1307<br>Claim to throne: Eldest son of Henry III.<br>Major events:<br>• Conquest and annexation of Wales (Statute of Rhuddlan 1284)<br>• Wars of Scottish Independence (Hammer of the Scots)<br>• Legal and administrative reforms (e.g., Statutes of Westminster, Quo Warranto)<br>• Expulsion of Jews from England (1290)",
},
{
id: "edward_i_prereign",
content: "Edward I",
start: "1239-06-17",
end: "1272-11-20",
group: "plantagenet",
subgroup: "edward_i",
className: "prereign",
title: "<b>Edward I (Longshanks)</b><br>Lifespan: 17 Jun 1239 to 7 Jul 1307<br>Reign: 20 Nov 1272 to 7 Jul 1307<br>Claim to throne: Eldest son of Henry III.<br>Major events:<br>• Conquest and annexation of Wales (Statute of Rhuddlan 1284)<br>• Wars of Scottish Independence (Hammer of the Scots)<br>• Legal and administrative reforms (e.g., Statutes of Westminster, Quo Warranto)<br>• Expulsion of Jews from England (1290)",
},
// Henry III
{
id: "henry_iii_reign",
content: " ",
start: "1216-10-28",
end: "1272-11-16",
group: "plantagenet",
subgroup: "henry_iii",
className: "reign",
title: "<b>Henry III (Henry of Winchester)</b><br>Lifespan: 1 Oct 1207 to 16 Nov 1272<br>Reign: 28 Oct 1216 to 16 Nov 1272<br>Claim to throne: Eldest son of King John;<br>acceded as a child during the First Barons' War.<br>Major events:<br>• Long reign marked by baronial opposition<br>• Provisions of Oxford and Westminster (attempted constitutional reform)<br>• Second Barons' War (led by Simon de Montfort)<br>• Extensive rebuilding of Westminster Abbey",
},
{
id: "henry_iii_prereign",
content: "Henry III",
start: "1207-10-01",
end: "1216-10-28",
group: "plantagenet",
subgroup: "henry_iii",
className: "prereign",
title: "<b>Henry III (Henry of Winchester)</b><br>Lifespan: 1 Oct 1207 to 16 Nov 1272<br>Reign: 28 Oct 1216 to 16 Nov 1272<br>Claim to throne: Eldest son of King John;<br>acceded as a child during the First Barons' War.<br>Major events:<br>• Long reign marked by baronial opposition<br>• Provisions of Oxford and Westminster (attempted constitutional reform)<br>• Second Barons' War (led by Simon de Montfort)<br>• Extensive rebuilding of Westminster Abbey",
},
// John I
{
id: "john_i_reign",
content: " ",
start: "1199-04-06", // Death of Richard I; coronation 27 May 1199
end: "1216-10-19",
group: "plantagenet",
subgroup: "john_i",
className: "reign",
title: "<b>John (Lackland)</b><br>Lifespan: 24 Dec 1166 to 19 Oct 1216<br>Reign: 6 Apr 1199 to 19 Oct 1216<br>Claim to throne: Youngest surviving son of Henry II;<br>succeeded his brother Richard I.<br>Major events:<br>• Loss of Normandy and other French possessions (1204)<br>• Conflict with Pope Innocent III (Interdict on England)<br>• Forced to sign Magna Carta (1215)<br>• First Barons' War (1215–1217)",
},
{
id: "john_i_prereign",
content: "John I",
start: "1166-12-24",
end: "1199-04-06",
group: "plantagenet",
subgroup: "john_i",
className: "prereign",
title: "<b>John (Lackland)</b><br>Lifespan: 24 Dec 1166 to 19 Oct 1216<br>Reign: 6 Apr 1199 to 19 Oct 1216<br>Claim to throne: Youngest surviving son of Henry II;<br>succeeded his brother Richard I.<br>Major events:<br>• Loss of Normandy and other French possessions (1204)<br>• Conflict with Pope Innocent III (Interdict on England)<br>• Forced to sign Magna Carta (1215)<br>• First Barons' War (1215–1217)",
},
// Richard I
{
id: "richard_i_reign",
content: " ",
start: "1189-07-06", // Death of Henry II; coronation 3 Sep 1189
end: "1199-04-06",
group: "plantagenet",
subgroup: "richard_i",
className: "reign",
title: "<b>Richard I (Richard the Lionheart)</b><br>Lifespan: 8 Sep 1157 to 6 Apr 1199<br>Reign: 6 Jul 1189 to 6 Apr 1199<br>Claim to throne: Third son of Henry II; succeeded his father after rebelling against him.<br>Major events:<br>• Leading Christian commander during the Third Crusade<br>• Captured and held for ransom by Leopold V of Austria on return from Crusade<br>• Spent little time in England (estimated 6 months of reign)<br>• Wars in France against Philip II Augustus",
},
{
id: "richard_i_prereign",
content: "Richard I",
start: "1157-09-08",
end: "1189-07-06",
group: "plantagenet",
subgroup: "richard_i",
className: "prereign",
title: "<b>Richard I (Richard the Lionheart)</b><br>Lifespan: 8 Sep 1157 to 6 Apr 1199<br>Reign: 6 Jul 1189 to 6 Apr 1199<br>Claim to throne: Third son of Henry II; succeeded his father after rebelling against him.<br>Major events:<br>• Leading Christian commander during the Third Crusade<br>• Captured and held for ransom by Leopold V of Austria on return from Crusade<br>• Spent little time in England (estimated 6 months of reign)<br>• Wars in France against Philip II Augustus",
},
// Henry II
{
id: "henry_ii_reign",
content: " ",
start: "1154-10-25", // Death of Stephen; coronation 19 Dec 1154
end: "1189-07-06",
group: "plantagenet",
subgroup: "henry_ii",
className: "reign",
title: "<b>Henry II (Henry Curtmantle)</b><br>Lifespan: 5 Mar 1133 to 6 Jul 1189<br>Reign: 25 Oct 1154 to 6 Jul 1189<br>Claim to throne: Son of Empress Matilda (designated heir of Henry I) and Geoffrey Plantagenet;<br>designated heir by Stephen in the Treaty of Wallingford.<br>Major events:<br>• Establishment of the Angevin Empire (England, large parts of France)<br>• Legal reforms establishing basis of English Common Law<br>• Conflict with Thomas Becket, Archbishop of Canterbury<br>• Great Revolt (1173–1174) by his wife Eleanor and sons",
},
{
id: "henry_ii_prereign",
content: "Henry II",
start: "1133-03-05",
end: "1154-10-25",
group: "plantagenet",
subgroup: "henry_ii",
className: "prereign",
title: "<b>Henry II (Henry Curtmantle)</b><br>Lifespan: 5 Mar 1133 to 6 Jul 1189<br>Reign: 25 Oct 1154 to 6 Jul 1189<br>Claim to throne: Son of Empress Matilda (designated heir of Henry I) and Geoffrey Plantagenet;<br>designated heir by Stephen in the Treaty of Wallingford.<br>Major events:<br>• Establishment of the Angevin Empire (England, large parts of France)<br>• Legal reforms establishing basis of English Common Law<br>• Conflict with Thomas Becket, Archbishop of Canterbury<br>• Great Revolt (1173–1174) by his wife Eleanor and sons",
},
// House of Lancaster
// Henry VI
{
id: "henry_vi_reign2",
content: " ",
start: "1470-10-03", // Restoration
end: "1471-04-11", // Deposed again
group: "lancaster",
subgroup: "henry_vi",
className: "reign",
title: "<b>Henry VI</b><br>Lifespan: 6 Dec 1421 to ~21 May 1471<br>Reign: 1 Sep 1422 - 4 Mar 1461 / 3 Oct 1470 - 11 Apr 1471<br>Claim to throne: Only child of Henry V; acceded as an infant.<br>Major events:<br>• Loss of French territories (end of Hundred Years' War)<br>• Outbreak of the Wars of the Roses<br>• Periods of mental instability leading to protectorates<br>• Deposed by Edward IV (1461), briefly restored (1470), deposed again and died/murdered",
},
{
id: "henry_vi_reign1",
content: " ",
start: "1422-09-01",
end: "1461-03-04", // Deposed by Edward IV
group: "lancaster",
subgroup: "henry_vi",
className: "reign",
title: "<b>Henry VI</b><br>Lifespan: 6 Dec 1421 to ~21 May 1471<br>Reign: 1 Sep 1422 - 4 Mar 1461 / 3 Oct 1470 - 11 Apr 1471<br>Claim to throne: Only child of Henry V; acceded as an infant.<br>Major events:<br>• Loss of French territories (end of Hundred Years' War)<br>• Outbreak of the Wars of the Roses<br>• Periods of mental instability leading to protectorates<br>• Deposed by Edward IV (1461), briefly restored (1470), deposed again and died/murdered",
},
{
id: "henry_vi_prereign",
content: "Henry VI",
start: "1421-12-06",
end: "1422-09-01",
group: "lancaster",
subgroup: "henry_vi",
className: "prereign",
title: "<b>Henry VI</b><br>Lifespan: 6 Dec 1421 to ~21 May 1471<br>Reign: 1 Sep 1422 - 4 Mar 1461 / 3 Oct 1470 - 11 Apr 1471<br>Claim to throne: Only child of Henry V; acceded as an infant.<br>Major events:<br>• Loss of French territories (end of Hundred Years' War)<br>• Outbreak of the Wars of the Roses<br>• Periods of mental instability leading to protectorates<br>• Deposed by Edward IV (1461), briefly restored (1470), deposed again and died/murdered",
},
// Henry V
{
id: "henry_v_reign",
content: " ",
start: "1413-03-21",
end: "1422-08-31",
group: "lancaster",
subgroup: "henry_v",
className: "reign",
title: "<b>Henry V (Henry of Monmouth)</b><br>Lifespan: ~16 Sep 1386 to 31 Aug 1422<br>Reign: 21 Mar 1413 to 31 Aug 1422<br>Claim to throne: Eldest son of Henry IV.<br>Major events:<br>• Hundred Years' War: Renewed conflict with France<br>• Famous victory at the Battle of Agincourt (1415)<br>• Treaty of Troyes (1420) making him heir to the French throne<br>• Died of dysentery while on campaign in France",
},
{
id: "henry_v_prereign",
content: "Henry V",
start: "1386-09-16", // Approximate birth date
end: "1413-03-21",
group: "lancaster",
subgroup: "henry_v",
className: "prereign",
title: "<b>Henry V (Henry of Monmouth)</b><br>Lifespan: ~16 Sep 1386 to 31 Aug 1422<br>Reign: 21 Mar 1413 to 31 Aug 1422<br>Claim to throne: Eldest son of Henry IV.<br>Major events:<br>• Hundred Years' War: Renewed conflict with France<br>• Famous victory at the Battle of Agincourt (1415)<br>• Treaty of Troyes (1420) making him heir to the French throne<br>• Died of dysentery while on campaign in France",
},
// Henry IV
{
id: "henry_iv_reign",
content: " ",
start: "1399-09-30",
end: "1413-03-20",
group: "lancaster",
subgroup: "henry_iv",
className: "reign",
title: "<b>Henry IV (Henry Bolingbroke)</b><br>Lifespan: ~15 Apr 1367 to 20 Mar 1413<br>Reign: 30 Sep 1399 to 20 Mar 1413<br>Claim to throne: Deposed Richard II; son of John of Gaunt, 3rd son of Edward III<br>(claim based on descent and conquest).<br>Major events:<br>• Deposed his cousin Richard II<br>• Faced numerous rebellions (e.g., Owain Glyndŵr's Welsh revolt, Percy family - Battle of Shrewsbury 1403)<br>• Secured Lancastrian dynasty on the throne<br>• Suffered from poor health in later years",
},
{
id: "henry_iv_prereign",
content: "Henry IV",
start: "1367-04-15", // Approximate birth date
end: "1399-09-30",
group: "lancaster",
subgroup: "henry_iv",
className: "prereign",
title: "<b>Henry IV (Henry Bolingbroke)</b><br>Lifespan: ~15 Apr 1367 to 20 Mar 1413<br>Reign: 30 Sep 1399 to 20 Mar 1413<br>Claim to throne: Deposed Richard II; son of John of Gaunt, 3rd son of Edward III<br>(claim based on descent and conquest).<br>Major events:<br>• Deposed his cousin Richard II<br>• Faced numerous rebellions (e.g., Owain Glyndŵr's Welsh revolt, Percy family - Battle of Shrewsbury 1403)<br>• Secured Lancastrian dynasty on the throne<br>• Suffered from poor health in later years",
},
// House of York
// Richard III
{
id: "richard_iii_reign",
content: " ",
start: "1483-06-26",
end: "1485-08-22",
group: "york",
subgroup: "richard_iii",
className: "reign",
title: "<b>Richard III</b><br>Lifespan: 2 Oct 1452 to 22 Aug 1485<br>Reign: 26 Jun 1483 to 22 Aug 1485<br>Claim to throne: Brother of Edward IV; declared Edward V illegitimate (Titulus Regius),<br>claiming throne for himself as protector.<br>Major events:<br>• Wars of the Roses continued<br>• Disappearance of the Princes in the Tower (Edward V and his brother)<br>• Buckingham's rebellion (1483)<br>• Defeated and killed at the Battle of Bosworth Field by Henry Tudor (Henry VII)",
},
{
id: "richard_iii_prereign",
content: "Richard III",
start: "1452-10-02",
end: "1483-06-26",
group: "york",
subgroup: "richard_iii",
className: "prereign",
title: "<b>Richard III</b><br>Lifespan: 2 Oct 1452 to 22 Aug 1485<br>Reign: 26 Jun 1483 to 22 Aug 1485<br>Claim to throne: Brother of Edward IV; declared Edward V illegitimate (Titulus Regius),<br>claiming throne for himself as protector.<br>Major events:<br>• Wars of the Roses continued<br>• Disappearance of the Princes in the Tower (Edward V and his brother)<br>• Buckingham's rebellion (1483)<br>• Defeated and killed at the Battle of Bosworth Field by Henry Tudor (Henry VII)",
},
// Edward V
{
id: "edward_v_reign",
content: " ",
start: "1483-04-09",
end: "1483-06-25",
group: "york",
subgroup: "edward_v",
className: "reign",
title: "<b>Edward V</b><br>Lifespan: 2 Nov 1470 to ~1483 (presumed)<br>Reign: 9 Apr 1483 to 25 Jun 1483<br>Claim to throne: Eldest son of Edward IV.<br>Major events:<br>• Succeeded father as a minor (age 12)<br>• Reign dominated by uncle Richard, Duke of Gloucester (Lord Protector)<br>• Declared illegitimate by Parliament (Titulus Regius)<br>• Deposed and confined to Tower of London with brother (Princes in the Tower), presumed murdered",
},
{
id: "edward_v_prereign",
content: "Edward V",
start: "1470-11-02",
end: "1483-04-09",
group: "york",
subgroup: "edward_v",
className: "prereign",
title: "<b>Edward V</b><br>Lifespan: 2 Nov 1470 to ~1483 (presumed)<br>Reign: 9 Apr 1483 to 25 Jun 1483<br>Claim to throne: Eldest son of Edward IV.<br>Major events:<br>• Succeeded father as a minor (age 12)<br>• Reign dominated by uncle Richard, Duke of Gloucester (Lord Protector)<br>• Declared illegitimate by Parliament (Titulus Regius)<br>• Deposed and confined to Tower of London with brother (Princes in the Tower), presumed murdered",
},
// Edward IV
{
id: "edward_iv_reign2",
content: " ",
start: "1471-04-11", // Restored after Battle of Barnet
end: "1483-04-09",
group: "york",
subgroup: "edward_iv",
className: "reign",
title: "<b>Edward IV</b><br>Lifespan: 28 Apr 1442 to 9 Apr 1483<br>Reign: 4 Mar 1461 - 3 Oct 1470 / 11 Apr 1471 - 9 Apr 1483<br>Claim to throne: Eldest surviving son of Richard, Duke of York (claimant through Edward III's second son);<br>deposed Henry VI in Wars of the Roses.<br>Major events:<br>• Wars of the Roses (victories at Towton, Barnet, Tewkesbury)<br>• Deposed Henry VI (1461)<br>• Briefly deposed by Warwick the Kingmaker and Henry VI's restoration (1470-71)<br>• Restored to throne (1471) until unexpected death",
},
{
id: "edward_iv_reign1",
content: " ",
start: "1461-03-04",
end: "1470-10-03", // Deposed by Henry VI restoration
group: "york",
subgroup: "edward_iv",
className: "reign",
title: "<b>Edward IV</b><br>Lifespan: 28 Apr 1442 to 9 Apr 1483<br>Reign: 4 Mar 1461 - 3 Oct 1470 / 11 Apr 1471 - 9 Apr 1483<br>Claim to throne: Eldest surviving son of Richard, Duke of York (claimant through Edward III's second son);<br>deposed Henry VI in Wars of the Roses.<br>Major events:<br>• Wars of the Roses (victories at Towton, Barnet, Tewkesbury)<br>• Deposed Henry VI (1461)<br>• Briefly deposed by Warwick the Kingmaker and Henry VI's restoration (1470-71)<br>• Restored to throne (1471) until unexpected death",
},
{
id: "edward_iv_prereign",
content: "Edward IV",
start: "1442-04-28",
end: "1461-03-04",
group: "york",
subgroup: "edward_iv",
className: "prereign",
title: "<b>Edward IV</b><br>Lifespan: 28 Apr 1442 to 9 Apr 1483<br>Reign: 4 Mar 1461 - 3 Oct 1470 / 11 Apr 1471 - 9 Apr 1483<br>Claim to throne: Eldest surviving son of Richard, Duke of York (claimant through Edward III's second son);<br>deposed Henry VI in Wars of the Roses.<br>Major events:<br>• Wars of the Roses (victories at Towton, Barnet, Tewkesbury)<br>• Deposed Henry VI (1461)<br>• Briefly deposed by Warwick the Kingmaker and Henry VI's restoration (1470-71)<br>• Restored to throne (1471) until unexpected death",
},
// Background items (Unchanged)
{
id: "anarchy1",
content: "The Anarchy",
start: "1135-12-01",
end: "1153-11-15",
type: "background",
group: "normandy",
},
{
id: "hundred1",
content: "Hundred Years' War",
start: "1337-05-24",
end: "1453-10-19",
type: "background",
group: "plantagenet",
},
{
id: "hundred2",
content: "",
start: "1337-05-24",
end: "1453-10-19",
type: "background",
group: "lancaster",
},
{
id: "roses1",
content: "War of the Roses",
start: "1455-05-22",
end: "1485-08-22",
type: "background",
group: "lancaster",
},
{
id: "roses2",
content: "",
start: "1455-05-22",
end: "1485-08-22",
type: "background",
group: "york",
},
// Events on specific dates
{
id: "battle_hastings",
content: "Battle of Hastings",
start: "1066-10-14",
group: "events",
subgroup: "point",
className: "point",
},
{
id: "domesday",
content: "Domesday Book",
start: "1086-07-01",
group: "events",
subgroup: "point2",
className: "point",
},
{
id: "magna_carta",
content: "Magna Carta",
start: "1215-06-15",
group: "events",
subgroup: "point",
className: "point",
},
{
id: "model",
content: "Model Parliament",
start: "1295-11-13",
group: "events",
subgroup: "point2",
className: "point",
},
{
id: "blackdeath",
content: "The Black Death",
start: "1348-06-15",
group: "events",
subgroup: "point",
className: "blackdeath",
},
{
id: "peasantsrevolt",
content: "The Peasants' Revolt",
start: "1381-05-30",
group: "events",
subgroup: "point2",
className: "point",
},
{
id: "bosworth",
content: "Battle of Bosworth",
start: "1485-08-22",
group: "events",
subgroup: "point",
className: "point",
},
]);
// Find the container element
const container = document.getElementById("visualization");
// Define timeline options
const options = {
min: "1000-01-01",
max: "1530-12-31",
start: "1000-01-01",
end: "1530-12-31",
editable: false,
stack: false,
stackSubgroups: true,
orientation: "both",
};
// Create the timeline instance ONLY if the container was found
if (container) {
const timeline = new vis.Timeline(container, items, groups, options);
document.getElementById("zoomIn").onclick = function () {
timeline.zoomIn(0.3);
};
document.getElementById("zoomOut").onclick = function () {
timeline.zoomOut(0.3);
};
// No return value needed as we are manipulating the DOM directly (side effect)
} else {
console.error("Timeline container #visualization not found AFTER vis check.");
// Display error in the div if possible, though it shouldn't happen if div exists
const errorDiv = document.getElementById("visualization");
if (errorDiv) {
errorDiv.innerHTML = '<p style="color: red;">Error: Could not find the container element #visualization.</p>';
}
}
} // End of the 'else' block (where 'vis' is confirmed to be defined)
return document.createElement('span'); // to avoid any output (e.g., "undefined")
}English Monarchs 1066-1485
A timeline of English monarchs from 1066 to 1485. The lifespans of monarchs are shown as blue bars, with the period of actual reign highlighted in a darker shade of blue.
Interacting with the timeline on a desktop computer:
- Zoom in by scrolling up, and zoom out by scrolling down.
- After zooming in, you can move along the timeline by clicking and holding the left mouse button, then dragging left or right.
- To scroll the page instead of zooming the timeline, move your mouse pointer outside the timeline area or over the column with the houses.
- Hover over an item to see more information in a tooltip.
Interacting with the timeline on a mobile or touch device:
- Pinch to zoom in or out on the timeline. (This is rather temperamental though. Alternatively, you can use the zoom buttons.)
- After zooming in, you can move along the timeline by dragging left or right with one finger.
- Tap an item with two fingers to see more information. Tap with two fingers again to close the tooltip. (On some devices, you may need to tap and hold to trigger the tooltip.)