gt icon indicating copy to clipboard operation
gt copied to clipboard

Nanoplot: data area fill color is not column-specific

Open lgaborini opened this issue 1 year ago • 0 comments

With {gt} 0.10.1, it seems that data_area_fill_color is applied to all nanoplot columns.
The other options seem column-specific so far (I didn't check everything yet)!

library(gt)
library(tidyverse)

gt::illness |>
   gt::gt(
      rowname_col = "test"
   ) |>
   gt::cols_nanoplot(
      columns = contains("day"),
      options = gt::nanoplot_options(
         data_point_fill_color = "orange",
         data_line_stroke_color = "yellow",
         data_area_fill_color = "red",
         data_point_radius  = 15,
      ),
      new_col_name = "plot_progression"
   ) |>
   gt::cols_nanoplot(
      columns = contains("norm"),
      options = gt::nanoplot_options(
         data_point_fill_color = "lightblue",
         data_area_fill_color = "blue",
         data_line_stroke_color = "green",
      ),
      new_col_name = "plot_norm"
   )

image

Created on 2024-03-08 with reprex v2.1.0

lgaborini avatar Mar 08 '24 12:03 lgaborini