JSFiddle - React, Tailwind, and code Playground
HTML
<head>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
font-size: 130%;
}
th, td {
padding: 10px;
}
</style>
</head>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/highcharts-more.js"></script>
<script src="http://code.highcharts.com/modules/solid-gauge.src.js"></script>
<h1 style="text-align:center">Gauges in Austin, Texas, USA</h1>
<table border="0" style="width:100%">
<tr>
<td width="25%">Select location:</td>
<td width="25%"><form action="">
<select name="Countries" STYLE="font-family : monospace; font-size : 18pt">
<option value="USA" selected>USA</option>
<option value="Mexico">Saab</option>
<option value="Canada"</option>
<option value="Spain">Audi</option>
</select>
</form></td>
<td width="25%"><form action="">
<select name="States" STYLE="font-family : monospace; font-size : 18pt">
<option value="Texas" selected>Texas</option>
<option value="New Mexico"</option>
</select>
</form></td>
<td width="25%"><form action="">
<select name="Cities" STYLE="font-family : monospace; font-size : 18pt">
<option value="Austin" selected>Austin</option>
</select>
</form></td>
</tr>
</table>
<div style="width: 900px; height: 400px; margin: 0 auto">
<div id="container-visionary" style="width: 300px; height: 200px; float: left"></div>
<div id="container-optimism" style="width: 300px; height: 200px; float: left"></div>
<div id="container-ps" style="width: 300px; height: 200px; float: left"></div>
</div>
JavaScript
$(function () {
var gaugeOptions = {
chart: {
type: 'solidgauge'
},
title: null,
pane: {
center: ['50%', '85%'],
size: '140%',
startAngle: -90,
endAngle: 90,
background: {
backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
innerRadius: '60%',
outerRadius: '100%',
shape: 'arc'
}
},
tooltip: {
enabled: false
},
// the value axis
yAxis: {
stops: [
[0.5, '#DF5353'], // green
[0.7, '#DDDF0D'], // yellow
[0.9, '#55BF3B'] // red
],
lineWidth: 0,
minorTickInterval: null,
tickPixelInterval: 400,
tickWidth: 0,
title: {
y: -70
},
labels: {
y: 16,
formatter:function(){
if(this.isFirst)
return 'Less';
else if(this.isLast)
return 'More'
else
return this.value;
}
}
},
plotOptions: {
solidgauge: {
dataLabels: {
y: 5,
borderWidth: 0,
useHTML: true
}
}
}
};
var gaugeOptionsOptimism = {
chart: {
type: 'solidgauge'
},
title: null,
pane: {
center: ['50%', '85%'],
size: '140%',
startAngle: -90,
endAngle: 90,
background: {
backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
innerRadius: '60%',
outerRadius: '100%',
shape:...