Here’s a fork with a few modifications that get your chart working:
Notes:
Whenever I have trouble with require I usually hit up this notebook:
In this case, the main function is inside the default property so I had to modify the suggestion a tiny bit.
I created a separate HTML element cell to serve as a container for the chart, and then passed the element directly to ApexCharts rather than using document.querySelector. Doing things this way makes it so that there’s an explicit dependence between the two cells in Observable’s runtime.
The chart was displaying with zero width until I put an explicit width number in.
Thanks for you quick reply. Very appreciated!
I cannot display your fork, but the link “Module require debugger” totally helped me solved my issue. I updated my notebook with a working solution.