我正在尝试为 googlevis 饼图创建自定义工具提示。
我通过 googleVis 找到了使用角色,但我无法将类似的概念复制到饼图中。请参阅下文,了解我实现这一目标的尝试之一:
df <- data.frame(year=c("a","b","g"),pop=1:3, pop.html.tooltip=c("alpha","beta","gamma"))
plot(
gvisPieChart(df,options=list(tooltip="{isHtml:'true'}"))
)
此外,我发现通过 googleVis 使用角色中的第一个柱形图示例无法正常工作。尽管确定性概念运行良好,但工具提示并未按照 dat 数据框的 Sales.html.tooltip 列中的定义显示。
显然,除了 gvisScatterChart 之外,我在其他所有图表中的工具提示都有问题。