-2
目前我使用谷歌的圖表,以顯示我的.NET Web application.I報告使用谷歌的組合圖表時許,列charts.Here是我使用的示例代碼。谷歌圖表軸線沒有得到
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawVisualization);
function drawVisualization() {
// Some raw data (not necessarily accurate)
var data = google.visualization.arrayToDataTable([
['Month', 'Bolivia', 'Ecuador', 'Madagascar', 'Papua New Guinea', 'Rwanda', 'Average'],
['2004/05', 165, 938, 522, 998, 450, 614.6],
['2005/06', 135, 1120, 599, 1268, 288, 682],
['2006/07', 157, 1167, 587, 807, 397, 623],
['2007/08', 139, 1110, 615, 968, 215, 609.4],
['2008/09', 136, 691, 629, 1026, 366, 569.6]
]);
var options = {
title : 'Monthly Coffee Production by Country',
vAxis: {title: 'Cups'},
hAxis: {title: 'Month'},
seriesType: 'bars',
series: {5: {type: 'line'}}
};
var chart = new google.visualization.ComboChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
<div id="chart_div" style="width: 900px; height: 500px;"></div>
在i執行此代碼我正在歌廳的水平網格線,但我想一個垂直網格線也從「0」開始position.I想垂直網格線像下面URL(圖象)中所示。如何我可以通過使用谷歌appriciated可視化API.Your幫助WIL acheive它...
首先thanx您reply.But上面的代碼可貴的是從SQL server.In只是樣品coe.I我retriving數據,我可能會得到個月一月,二月,三月...等或我可以得到第一列中的Grade1,Grade2,Grade3值。在那塞納里奧我怎樣才能得到垂直軸線到我的圖表。 –
就像我說的那樣,字符串值是不可能的。您需要提供示例數值,然後可以使用某些格式。另一個解決辦法是自己繪製垂直軸 – codebusta
您可以使用重疊繪製自己的垂直線!如果你給我適當的例子,你會使用,我可以找出解決方案,直到那個,我的答案是正確的! – codebusta