更改仪表 R 中的文本颜色

Change text color in gauge R

我有以下 rmarkdown 文件:

---
title: Gauge
runtime: shiny
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    vertical_layout: fill
    theme: yeti
---

### Probability
```{r}
library(flexdashboard)

gauge(
   value = 56, min = 1, max = 100, symbol = "%", 
   gaugeSectors(colors = c("#008cba")), label = "Index"
)
 ```

编辑方式:

56%1100Index

与 CSS?

我尝试将以下元素更改为 <style> ... </style>:

.chart-wrapper {
  background-color: #222c3d; /*change background-color. Work*/
  color: yellow !important; /*change text color. Doesn't work*/
}

将颜色更改为黄色。但是没有成功。

将以下内容添加到您的 CSS:

text {
  fill: yellow !important;
}
``