r - 字体不是粗体
问题描述
在下面的代码中(效果很好),当我将鼠标悬停在世界地图上的国家上时,我希望所有字体都是粗体或非粗体。正在发生的事情是根据以下示例 - 假设我将鼠标悬停在 USA 上然后我得到。562,079 人死亡 美国美国 病例数:30,211,178 人:320,635,163 人死亡人数百分比:v0.0097%
“Deaths United States”并不大胆。代码
output$World_Map <- renderPlotly({
l <- list(color = toRGB("grey"), width = 0.5)
g <- list(
showframe = FALSE,
showcoastlines = FALSE,
projection = list(type = "kavrayskiy7")
)
fig <- plot_geo(worldmap)
fig <- fig %>% add_trace(
z = ~ worldmap$Deaths,
color = ~ worldmap$Deaths,
colors = 'Reds',
locations = ~ worldmap$Country_Alpha_Code,
marker = list(line = l),
hoverinfo = "text",
text = ~ glue::glue(
"Deaths: {Country.x} <b>{Country_Alpha_Code}<b>\nCases: {comma(Cases,digits=0)}<b>\nPopulation: {comma(Population,digits=0)}<b>\nDeaths % by Population: {comma(Deaths_Perc_Pop,digits=4)}%</b>"
),
hovertemplate = "%{z:,0f}<extra>%{text}</extra>"
)
fig <-
fig %>% colorbar(title = 'Deaths - Positive Cases Gradient', tickformat = ",0f")
fig <-
fig %>% layout(title = 'Covid19 Global Pandemic .... <br>Data Source:<a href="https://coronavirus.jhu.edu/">Johns Hopkins University of Medicine</a>',
geo = g)
fig
})
问候
解决方案
推荐阅读
- php - 如何将 order_id 和其他订单详细信息传递到 payumoney 成功页面
- json - 复杂的打印声明
- python-3.x - 如果在解析配置时找不到项目,如何设置默认值
- decorator - vuex 不加载用 vuex-module-decorators 装饰的模块
- swift - “GADMobileAds”类型的值没有成员“开始”
- nginx - nginx: [emerg] getgrnam("nobody") 失败
- arrays - 跨越整个数组长度的最小子序列的长度?
- neo4j - neo4j 如何按节点计算不同的关系组?
- angular - 在 Angular 库模块中包含配置的最佳方式?
- ruby-on-rails - Rails 找到只有一个股东的用户的有效方法