I am using apex oracle version 23.1.0. I would like to put a chart in each card using apexcharts. https://apexcharts.com/.
I tried putting https://cdn.jsdelivr.net/npm/apexcharts in the javascript file urls and putting the following html code in the card region body but it is not displaying. Please help me. I checked console and got no errors.
<div id="chart"></div>
<script>
document.addEventListener("DOMContentLoaded", function() {
var options = {
series: [{
name: 'Sales',
data: [10, 41, 35, 51, 49, 62, 69, 91, 148]
}],
chart: {
height: 350,
type: 'line',
zoom: {
enabled: false
}
},
dataLabels: {
enabled: false
},
stroke: {
curve: 'smooth'
},
title: {
text: 'Sales Trends',
align: 'left'
},
xaxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep'],
}
};
var chart = new ApexCharts(document.querySelector("#chart"), options);
chart.render();
});
</script>