如何恢复旧的高图界面?

时间:2017-02-22 11:52:44

标签: r highcharts

在R中将我的highcharter包更新为0.5.0(即,highcharts也更新为v5)之后,我的highcharts现在包括四个新按钮(用于绘制圆圈等,到图形上)。我如何回到旧布局?

提供一个jkunst示例,

library(dplyr)  
library(highcharter)  
data(stars)

colors <- c("#FB1108","#FD150B","#FA7806","#FBE426","#FCFB8F",
            "#F3F5E7", "#C7E4EA","#ABD6E6","#9AD2E1")

stars$color <- colorize(log(stars$temp), colors)

x <- c("Luminosity", "Temperature", "Distance")  
y <- sprintf("{point.%s:.2f}", c("lum", "temp", "distance"))  
tltip <- tooltip_table(x, y)

hchart(stars, "scatter", hcaes(temp, lum, size = radiussun, color =
color)) %>%  
hc_chart(backgroundColor = "black") %>%  
hc_xAxis(type = "logarithmic", reversed = TRUE) %>%  
hc_yAxis(type = "logarithmic", gridLineWidth = 0) %>%  
hc_title(text = "Our nearest Stars") %>%  
hc_subtitle(text = "In a Hertzsprung-Russell diagram") %>%  
hc_tooltip(useHTML = TRUE, headerFormat = "", pointFormat = tltip) %>%  
hc_size(height = 600)

导致this

虽然它应该看起来像第二个例子:

http://jkunst.com/highcharter/showcase.html

我可以用hc_exporting(enabled = FALSE)删除导出按钮,但我不知道如何摆脱这四个按钮。

1 个答案:

答案 0 :(得分:0)

我也没有默认新按钮,但根据documentation hc_annotationsOptions控制新按钮的行为:

hc_annotationsOptions(stars, enabledButtons = F)

应该足够了。