In the Slate Calendar widget is it possible to colour events by some property value or is the colour shown just the colour of the object type?
Hello,
Slate Calendar widget events can be styled by grouping them in Series (see the eventSeries
property in https://www.palantir.com/docs/foundry/slate/widgets-time/#calendar-widget). Each event HTML element will get a class named after its Series. This class can be used to apply styles using the Styles panel.
You can use handlebars to set the Series to a list of property values, e.g. {{myPropertyValues}}
.
Is there a way to have the color assignment more flexibel/dynamically? With the mentioned setup above, I need to hard-code all value combinations into the app’s CSS. In a chart widget for example, I can just provide an array of color codes to dynamically style the calendar. Would be great to have the possibility to assign the colors dynamically via a function.