JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/solid-gauge.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function() {
divID = 'container';
dataC = {
'title': '<b style="color:#333333;font-size:15px;font-weight:bold;">Connect</b>',
'seriesDataConnections': 7,
'seriesData': 7
};
gaugeChartObj = new Highcharts.Chart({
credits: false,
chart: {
renderTo: divID,
type: 'solidgauge',
marginTop: 30,
},
title: {
text: dataC.title,
style: {
fontSize: '16px'
}
},
exporting: {
enabled: false
},
tooltip: {
enabled: false
},
pane: {
startAngle: 0,
endAngle: 360,
background: [{
outerRadius: '106%',
innerRadius: '94%',
backgroundColor: Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0.3).get(),
borderWidth: 0
}]
},
yAxis: {
min: 0,
max: 100,
lineWidth: 0,
tickPositions: []
},
plotOptions: {
solidgauge: {
borderWidth: '12px',
dataLabels: {
enabled: true,
y: -40,
borderWidth: 0,
backgroundColor: 'none',
useHTML: true,
shadow: false,
style: {
fontSize: '16px'
},
formatter: function() {
return '<div style="width:100%;text-align:center;"><span style="font-size:1.2em;font-weight:bold;">' + this.point.series.name + '</span><br/><span style="font-size:3em;color:' + Highcharts.getOptions().colors[0] + ';font-weight:bold;">' + Highcharts.numberFormat(this.y / 10, 0) + '</span>';
}
},
linecap: 'round',
stickyTracking: true
}
},
series: [{
name: 'Subscriptions',
borderColor: Highcharts.getOptions().colors[0],
data: [{
color: Highcharts.getOptions().colors[0],
radius: '100%',
innerRadius: '100%',
y: dataC.seriesData
}]
}],
lang: {
noData: "No data to display"
},
noData: {
style: {
fontWeight:...