Gauge Chart Example
An example of a Google Gauge Chart.
HTML
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<div style="width:400px;text-align:center">
<div id="chart_div" style="width: 400px; height: 400px;">
</div>
<h1>MemoryAfter</h1>
</div>
JavaScript
google.charts.load('current', {
'packages': ['gauge']
});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Label', 'Value'],
['', 95]
]);
var options = {
majorTicks: ['', '', 'Competitive', '', 'Elite'],
width: 400,
height: 600,
redFrom: 90,
redTo: 100,
yellowFrom: 75,
yellowTo: 90,
minorTicks: 5
};
var chart = new google.visualization.Gauge(document.getElementById('chart_div'));
chart.draw(data, options);
//$('#chart_div').find('table').append("<h1>ciao</h1>");
$("svg > g > text:first").attr("y", 100);
}