daattali / timevis

📅 Create interactive timeline visualizations in R
http://daattali.com/shiny/timevis-demo/
Other
650 stars 157 forks source link

Changing colour of vis-item in vis-group #107

Closed pythiantech closed 3 years ago

pythiantech commented 3 years ago

@daattali thanks for creating yet another terrific package. This is not really an issue. Was wondering if there is any way of changing the colour of all the vis-item belonging to a particular vis-group? For grouped data, I saw that the font colour can be changed by specifying the colour in the grouped dataframe, but I am loking at some way of distinguishing the entire group through colours.

daattali commented 3 years ago

It sounds like using CSS classes would be the easiest way to do this. You can specify a custom css class for each item, so ad the same class to all items of the same group and then use CSS to give that class a background. If you need help with implementing that, feel free to contact me through https://attalitech.com/contact

pythiantech commented 3 years ago

@daattali thanks for the suggestion! Was able to achieve it by specifying the className in the grouped dataframe and then adding some custom CSS in my styles.css. This is the final result

image