Enable ApexCharts

new ApexCharts + render.

Enable ApexCharts under Libraries, wait until it is checked, then paste the whole editor. new ApexCharts(el, options).render().

Goal

Run every block and confirm the chart is visible.

document.body.innerHTML = '<div id="c"></div>';
new ApexCharts(document.getElementById("c"), { chart: { type: "bar", height: 280, width: 420 }, series: [{ name: "units", data: [21, 15, 15, 18, 12] }], xaxis: { categories: ["Nairobi", "Mombasa", "Kisumu", "Nakuru", "Eldoret"] } }).render();
console.log('bar');
console.log("ApexCharts", typeof ApexCharts);