隐藏googleVis Bubble Charts中的标签

Ant*_*nto 7 json r google-visualization googlevis

我想隐藏标签.我相信这与选项bubble.textStyle和设置颜色有关,none但我无法弄明白.

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)
Run Code Online (Sandbox Code Playgroud)

谢谢..

Eri*_*ail 5

棘手的是它是JSON对象中的JSON对象.首先,您使用bubble="{}创建第一个JSON对象,然后textStyle:{}在其中创建下一个JSON对象 bubble="{}.

这是我的代码和截图,

# 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)
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述