Skip to Main Content

Developer Community

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to use apexcharts in card region apex oracle?

ste veSep 22 2024 — edited Sep 22 2024

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>

Comments
Post Details
Added on Sep 22 2024
0 comments
393 views