ot('chart', [currentTrace, previousTrace], layout, { responsive: true });
    }


    // Event handlers for sorting
    document.getElementById('sort-asc').onclick = () => drawChart(ops.slice().sort((a, b) => a.mean - b.mean));
    document.getElementById('sort-desc').onclick = () => drawChart(ops.slice().sort((a, b) => b.mean - a.mean));

    // Initialize
    fetchData();
  </script>
</body>

</html>