2014-02-07 2 views
2

googleVis를 사용하여 반짝이는 서버에서 세로 형 열 차트를 그립니다. gvisColumnChart 옵션을 전달하는 것처럼 보이지만 일부는 작동하지만 다른 것은 작동하지 않습니다. 예를 들어, 아래의 모든 *Axis.gridlines.* 옵션은 blisfully 무시되며, 다른 하나는 fontSize과 같이 정확합니다. 생산 된 플롯의빛나는 gvisColumnChart가 전달 된 옵션을 전달했습니다.

library("googleVis") 
data = data.frame(fb_sample_id=sample(LETTERS, 10),value=rnorm(10)) 
A <- gvisColumnChart(data, options=list(legend="top", 
            xvar="fb_sample_id", 
            yvar="value", 
            orientation='vertical', 
            hAxis.gridlines.count=1, 
            vAxis.gridlines.count=100, 
            vAxis.gridlines.color="red", 
            hAxis.gridlines.color="blue", 
            fontSize=16, 
            width=300, 
            height=300, 
            colors="['orange','blue','green','red']" 
)) 
plot(A) 

참조 스냅 샷 : enter image description here

어떤 아이디어?

답변

1

yvar 중 하나만 표시하기 때문에 colors="['orange','blue','green','red']" 옵션이 작동하지 않습니다. 4 가지 색상을 지정하면 yvar의 4 개의 별개입니다.

*Axis.gridlines.*에 관한 작동하지 않는 이유, 나도 몰라,하지만 어쩌면이 막대 그래프의 vAxis.gridlines 옵션은 연속 축 지원됩니다, 당신은 이산 하나를 가지고 있기 때문에 (데이터 유형은 문자열입니다). (Barchart 및 Columnchart가 아니기 때문에 orientation ~ vertical"rotates the axes of the chart so that (for instance) a column chart becomes a bar chart"). 거기에 제한이 없기 때문에 hAxis.gridlines 옵션을 작동해야하지만

https://google-developers.appspot.com/chart/interactive/docs/gallery/barchart#Configuration_Options

...

관련 문제