93 lines
2.1 KiB
HTML
93 lines
2.1 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>Semi Circle Chart</title>
|
|
|
|
|
|
<link href="../../assets/styles.css" rel="stylesheet" />
|
|
|
|
<style>
|
|
#chart {
|
|
max-width: 450px;
|
|
margin: 35px auto;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="chart">
|
|
<apexchart type=radialBar height=350 :options="chartOptions" :series="series" />
|
|
</div>
|
|
|
|
<div id="html">
|
|
<div id="chart">
|
|
<apexchart type=radialBar height=350 :options="chartOptions" :series="series" />
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://unpkg.com/vue/dist/vue.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/apexcharts@latest"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/vue-apexcharts"></script>
|
|
|
|
<script>
|
|
new Vue({
|
|
el: '#chart',
|
|
components: {
|
|
apexchart: VueApexCharts,
|
|
},
|
|
data: {
|
|
series: [76],
|
|
chartOptions: {
|
|
plotOptions: {
|
|
radialBar: {
|
|
startAngle: -90,
|
|
endAngle: 90,
|
|
track: {
|
|
background: "#e7e7e7",
|
|
strokeWidth: '97%',
|
|
margin: 5, // margin is in pixels
|
|
shadow: {
|
|
enabled: true,
|
|
top: 2,
|
|
left: 0,
|
|
color: '#999',
|
|
opacity: 1,
|
|
blur: 2
|
|
}
|
|
},
|
|
dataLabels: {
|
|
name: {
|
|
show: false
|
|
},
|
|
value: {
|
|
offsetY: 15,
|
|
fontSize: '22px'
|
|
}
|
|
}
|
|
}
|
|
},
|
|
fill: {
|
|
type: 'gradient',
|
|
gradient: {
|
|
shade: 'light',
|
|
shadeIntensity: 0.4,
|
|
inverseColors: false,
|
|
opacityFrom: 1,
|
|
opacityTo: 1,
|
|
stops: [0, 50, 53, 91]
|
|
},
|
|
},
|
|
labels: ['Average Results'],
|
|
}
|
|
},
|
|
|
|
})
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html> |