<!DOCTYPE html> <html lang="zh" > <head> <meta charset="UTF-8"> <title>Apexcharts - Basic Circle Chart with Customizing Colors</title> </head> <body> <div id="chart"></div> <script src="https://cdn.bootcdn.net/ajax/libs/apexcharts/3.35.0/apexcharts.min.js"></script> </body> </html>
#chart {
max-width: 650px;
margin: 35px auto;
}
var options = {
chart: {
height: 280,
type: "radialBar",
},
series: [67],
colors: ["#20E647"],
plotOptions: {
radialBar: {
hollow: {
margin: 0,
size: "70%",
background: "#293450"
},
track: {
dropShadow: {
enabled: true,
top: 2,
left: 0,
blur: 4,
opacity: 0.15
}
},
dataLabels: {
name: {
offsetY: -10,
color: "#fff",
fontSize: "13px"
},
value: {
color: "#fff",
fontSize: "30px",
show: true
}
}
}
},
fill: {
type: "gradient",
gradient: {
shade: "dark",
type: "vertical",
gradientToColors: ["#87D4F9"],
stops: [0, 100]
}
},
stroke: {
lineCap: "round"
},
labels: ["Progress"]
};
var chart = new ApexCharts(document.querySelector("#chart"), options);
chart.render();