7

I want to hide the labels. I believe it is something to do with the option bubble.textStyle and setting the color to none but I can't figure it out.

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)

Thanks..

Anujith
  • 9,370
  • 6
  • 33
  • 48
Anto
  • 449
  • 5
  • 14

1 Answers1

5

The tricky thing is that it's a JSON object inside a JSON object. First you use bubble="{} to create the first JSON object and then textStyle:{} to create the next JSON object inside bubble="{}.

Here is my code and a screenshot,

# 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

Eric Fail
  • 8,191
  • 8
  • 72
  • 128
  • 1
    Thanks Eric! It works a treat now! `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'}}")); plot(Bubble);` – Anto Jan 21 '13 at 10:34