FormattingDsl

The formatting DSL allows you to create and combine CellAttributes to apply to one or multiple cells of a dataframe such that they have specific CSS attributes applied to them when rendered to HTML.

For instance, to specify black, bold text on a white background, you could write:

background(white) and textColor(black) and bold

It's also possible to define your own colors using rgb or interpolate colors using linear.

Use attr if you want to specify a custom CSS attribute.

For more information: See format on the documentation website.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A cell attribute that makes the text inside the cell bold.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A cell attribute that makes the text inside the cell italic.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A cell attribute that u͟n͟d͟e͟r͟l͟i͟n͟e͟s͟ the text inside the cell.

Link copied to clipboard

Functions

Link copied to clipboard
fun attr(name: String, value: String): CellAttributes

A custom cell attribute that allows you to specify any custom CSS attribute by name and value.

Link copied to clipboard

A cell attribute that sets the background color of a cell.

A cell attribute that sets the background color of a cell. A shortcut for background(rgb(...)).

Link copied to clipboard

Calculates an RgbColor by interpolating between from and to, given value. The interpolation is linear. If value falls outside the range from..to, the colors at the bounds will be used.

Link copied to clipboard

Shorthand for background(linear(...))

Link copied to clipboard
fun rgb(r: Short, g: Short, b: Short): RgbColor

Creates a new RgbColor instance with r (red), g (green), and b (blue) values from 0..255.

Link copied to clipboard

A cell attribute that sets the text color of a cell.

A cell attribute that sets the text color of a cell. A shortcut for textColor(rgb(...)).