【问题标题】:Hide labels in googleVis Bubble Charts在 googleVis 气泡图中隐藏标签
【发布时间】:2013-01-21 00:48:48
【问题描述】:

我想隐藏标签。我相信这与选项 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)

谢谢..

【问题讨论】:

    标签: json r google-visualization googlevis


    【解决方案1】:

    棘手的是它是 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)
    

    【讨论】:

    • 谢谢埃里克!它现在是一种享受! Bubble &lt;- 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);
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多