ol, 10);
        state.datasetColors[col] = e.target.value;
        renderDatasetColorEditors();
        ensureChart();
      }
      if (e.target.matches('[data-ds-color]')) {
        const col = parseInt(e.target.dataset.dsColor, 10);
        state.datasetColors[col] = e.target.value;
        ensureChart();
      }
      if (e.target.id === 'palette') {
        state.palette = e.target.value;
        ensureChart();
      }
      if (e.target.id === 'baseColor') {
        state.baseColor = e.target.value;
