【问题标题】:Adding a title to gvisGeoChart为 gvisGeoChart 添加标题
【发布时间】:2016-03-22 17:55:04
【问题描述】:

我无法在 googlevis 包中为 gvisGeoChart 添加标题。

这是我正在使用的代码:

test <- gvisGeoChart(state.data[["MA"]], locationvar = 'Location', colorvar = 'RateofLVP',
                 options=list(region="US-MA", 
                              displayMode="markers", 
                              resolution="provinces",
                              width=600, height=400,
                              title='TESTING MAPS',
                              colorAxis="{values:[1, 5],
                              colors:[\'yellow',\'red']}"))

当我运行此代码时,它会生成正确的地理图表,但图表顶部没有标题。感谢您的帮助!

【问题讨论】:

  • 您好像没有正确关闭colorAxis="{values:[1, 5],
  • 感谢您的帮助!抱歉,我错过了输入代码。我重新输入了它以解决您的问题。
  • 我将图表的宽度和高度增加到 1000,但没有任何区别。
  • 刚刚注意到 title 不包含在 GeoChart 的 configuration-options 中 -- 可能不可用...?
  • 啊,我明白了。你知道有什么方法可以在页面中添加标题吗?

标签: r google-visualization googlevis


【解决方案1】:

我想出了一个可能的解决方案,我可以将 googleVis 图表标题部分中的文本替换为 html 格式的标题代码。感谢您的帮助!

【讨论】:

    猜你喜欢
    • 2012-03-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多