Enable Apache ECharts under Libraries, wait until it is checked, then paste the whole editor. Sized div, echarts.init, setOption.
Goal
Run every block and confirm the chart is visible.
document.body.innerHTML = '<div id="c" style="width:480px;height:320px"></div>';
const c = echarts.init(document.getElementById("c"));
c.setOption({ title: { text: "Units" }, xAxis: { data: ["Nairobi", "Mombasa", "Kisumu", "Nakuru", "Eldoret"] }, yAxis: {}, series: [{ type: "bar", data: [21, 15, 15, 18, 12] }] });
console.log('bar');console.log("echarts", typeof echarts.init);