2013-09-27 223 views
3

http://j1309.hizliresim.com/1f/v/t1ux0.pngGoogle餅圖標籤

這就是我的圖表和我的代碼;

<script type="text/javascript"> 
    google.load("visualization", "1", {packages:["corechart"]}); 
    google.setOnLoadCallback(drawChart); 
    function drawChart() { 

    var data = google.visualization.arrayToDataTable([ 
     ['Task', 'Hours per Day'], 
     ['Work',  11], 
     ['Eat',  2], 
     ['Commute', 2], 
     ['Watch TV', 2], 
     ['Sleep', 7] 
    ]); 

    var options = { 
     title: 'My Daily Activities' 

    }; 

    var chart = new google.visualization.PieChart(document.getElementById('piechart')); 
    chart.draw(data, options); 
    } 
</script> 

我怎樣才能讓我的標籤,這樣的圖片。我想它顯示圖表以外的值

http://o1309.hizliresim.com/1f/v/t1uy7.png

回答