69 lines
1.8 KiB
HTML
69 lines
1.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
<title>Circle Gauge Chart - Multiple</title>
|
|
|
|
|
|
<link href="../../assets/styles.css" rel="stylesheet" />
|
|
|
|
<style>
|
|
#chart {
|
|
max-width: 650px;
|
|
margin: 35px auto;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="chart">
|
|
|
|
</div>
|
|
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/apexcharts@latest"></script>
|
|
|
|
<script>
|
|
var options = {
|
|
chart: {
|
|
height: 350,
|
|
type: 'radialBar',
|
|
},
|
|
plotOptions: {
|
|
radialBar: {
|
|
dataLabels: {
|
|
name: {
|
|
fontSize: '22px',
|
|
},
|
|
value: {
|
|
fontSize: '16px',
|
|
},
|
|
total: {
|
|
show: true,
|
|
label: 'Total',
|
|
formatter: function (w) {
|
|
// By default this function returns the average of all series. The below is just an example to show the use of custom formatter function
|
|
return 249
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
series: [44, 55, 67, 83],
|
|
labels: ['Apples', 'Oranges', 'Bananas', 'Berries'],
|
|
|
|
}
|
|
|
|
var chart = new ApexCharts(
|
|
document.querySelector("#chart"),
|
|
options
|
|
);
|
|
|
|
chart.render();
|
|
</script>
|
|
</body>
|
|
|
|
</html> |