ntListener('click', e => {
            [...e.target.parentElement.querySelectorAll('a')].map(elem => { elem.className = elem == e.target ? 'selector selector-active' : 'selector' });
        }));

        // Add event listeners for metric selectors
        document.getElementById('selector-metric-cold').addEventListener('click', e => { selectors.metric = 'cold'; render(); updateHistory(); });
        document.getElementById('selector-metric-hot').addEventListener('click', e => { selectors.metric = 'hot'; re