2013-01-21 6 views
7

라벨을 숨기고 싶습니다. 나는 그것이 bubble.textStyle 옵션과 관련이 있고 색을 none으로 설정한다고 생각하지만, 그것을 이해할 수는 없다.googleVis에서 라벨 숨기기 거품 차트

Bubble <- gvisBubbleChart(Fruits, idvar="Fruit", xvar="Sales", yvar="Expenses", 
          colorvar="Year", sizevar="Profit", 
          options=list(hAxis='{minValue:75, maxValue:125}', 
             width=500, height=300)) 
plot(Bubble) 

덕분에 ..

답변

5

까다로운 점은 JSON 객체 내부 JSON 객체라는 것이다. 먼저 bubble="{}을 사용하여 첫 번째 JSON 객체를 만든 다음 textStyle:{}을 사용하여 bubble="{} 안에 다음 JSON 객체를 만듭니다.

여기 내 코드와 스크린 샷입니다

# install.packages("googleVis", dependencies = TRUE) 
require(googleVis) 

Bubble <- gvisBubbleChart(Fruits, idvar="Fruit", xvar="Sales", yvar="Expenses", 
          colorvar="Year", sizevar="Profit", 
          options=list(hAxis='{minValue:75, maxValue:125}', 
             width=500, height=300), 
             bubble="{textStyle:{color: 'none', fontName: 
             <global-font-name>, fontSize: 
             <global-font-size>}}") 
plot(Bubble) 

enter image description here

+1

감사 에릭! 그것은 지금 치료를 작동합니다! 'Bubble <- gvisBubbleChart (Fruits, idvar = "과일", xvar = "판매", yvar = "비용", colorvar = "연도", sizevar = "이익", 옵션 = 목록 (hAxis ='{minValue : 75, maxValue : 125} ', width = 500, height = 300, bubble = "{textStyle : {color :'none '}}")); plot (Bubble);' – Anto