0
아래 스크립트는 Google 게이지를 보여줍니다.Google 게이지를 새 값으로 업데이트하십시오.
15 초마다 발생하는 jQuery get 문이 있습니다.
게이지를 업데이트하기 위해 updateGages()를 일부 스크립트로 바꾸고 싶습니다.
의견이 있으십니까?
<html>
<head>
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type='text/javascript'>
google.load('visualization', '1', {packages:['gauge']});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Label', 'Value'],
['Memory', 80],
['CPU', 55],
['Network', 68]
]);
var options = {
width: 400, height: 120,
redFrom: 90, redTo: 100,
yellowFrom:75, yellowTo: 90,
minorTicks: 5
};
var chart = new google.visualization.Gauge(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id='chart_div'></div>
</body>
</html>
의 잠재적 인 중복 [이 게시물] (http://stackoverflow.com/questions/3411854/ajax-google-visualization-api-gauge-with-jquery) – Bryan
완료로 차트를 다시 그리기 이 게시물에 깜박입니다. – user1032531