When all the plots have the same set of values, instead of typing the color mapping for all plots, default color to value mapping can be given which will generate the color mapping for all the plots based on the unique values present in each column
1 | generate_color_mapping(df, default_color_mapping)
|
df |
Data frame to be plotted using plot_timeline |
default_color_mapping |
Value to color mapping for all the plots in the data frame. ex: default_color_mapping <- c("0" = "#BCBEC0", "1" = "#1279C6") |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.