he grid diagram showing the number of rows or columns selected
  function createGridDiagram() {
    let diagram = document.getElementById('gridDiagram');
    diagram.innerHTML = "";

    function createCell(row, index, showSquare, showGradient, horizontal) {
      // Create a table cell with a pink background, padding, and a optional grey square in the center
      let cell = row.insertCell(index++);
      cell.className = "grid-cell";
      let direction = horizontal ? "horizontal" : "vertical";
      cell