2012-04-21 52 views
0

對於我的生活,我不能讓谷歌圖表傳奇不顯示,即使我指定「無」。 (這裏也注意到:Hiding the legend in Google Chart)。谷歌圖表傳奇不會消失

$options = array( 'title' => 'Average Load Summary', 
      'titlePosition' => 'in', 
      'legend.position' => 'none', 
      'width' => 1100, 
      'height' => 700, 
      'hAxis.slantedTextAngle' => 90, 
      'hAxis.position' => 'out', 
      'pointSize' => 5, 
      'hAxis.title' => 'Stops'); 

此外,我不能讓傾斜的文字角度水平(90度),這樣我的整個標籤將顯示。現在谷歌添加「...」我的標籤,他們是在大約45度的角度。最後,我也不能得到hAxis.titlevAxis.title顯示,不管是什麼...

感謝任何人可能有幫助。這是一個線型圖的方式...

回答

3

如果你有這樣的:

'legend.position' => 'none', 

試着這樣做:

'legend' => array('position' => 'none'), 

對於其他:

'hAxis' => array('title' => 'Stops', 'position' => 'out', 'slantedTextAngle' => 90), 

基本上傳說和hAxis接受多個參數,所以他們每個都有自己的數組o ptions。只有一個像寬度和高度的參數。

在javascript中就應該是這樣的:

var options = { 
    title: 'Average Load Summary' 
    ,legend: {position: 'none'} 
}; 
+0

我應該更新這個問題,我無意間得到了它在未來的問題回答。但是,謝謝! =) – Shackrock 2012-04-23 21:36:12

+0

點擊時如何隱藏特定的圖例? http://stackoverflow.com/questions/23609797/hide-specific-legend-in-google-chart – 2014-05-12 13:34:12