2015-11-19 256 views
1

我使用Google Visulization圖表來代表庫存數據的燭臺。 我面臨的問題是,如果有很多數據,軸標籤是重疊的(最多可以顯示30天的數據)。X軸標籤重疊

請告訴我是否以及如何解決問題?

我與

hAxis: { "title":"Ratings", showTextEvery:1 }, 

hAxis: { gridlines: { count: 10 } } 

http://jsfiddle.net/ovog4njt/2/

回答

3

嘗試,我會提出一些替代解決方案:

1.旋轉刻度標記

hAxis: { 
     "title": "Ratings", 
     showTextEvery: 1, 
     slantedText: true, 
     slantedTextAngle: 50 
    }, 

enter image description here

2.減少

hAxis: { 
     "title": "Ratings", 
     showTextEvery: 1, 
     minTextSpacing: 0 
    }, 

enter image description here

3.標籤之間的最小間距縮小標籤字體

hAxis: { 
     "title": "Ratings", 
     showTextEvery: 1, 
     minTextSpacing: 0, 
     textStyle: { 
      fontSize: 8 
     } 
    }, 

enter image description here

4.不要顯示的每一個刻度

hAxis: { 
     "title": "Ratings", 
     showTextEvery: 2, 
    }, 

enter image description here

5.上述

JSFiddle

See documentation here

任何組合