Introduction to Prawn::Graph Themes

A basic, but extensible theme system is now implemented, which is heavily inspired by Gruff. Themes are defined in a series of YAML files stored in the lib/prawn/graph/themes; however an interface is available to let Prawn::Graph know about your theme and make it available to use. You just simply need to craft a file in the correct format.

There are, some limitations to what can be achieved with themes. Only one background colour can be specified as for the moment gruff-style background gradients are not possible. Also for now, you can not set different colours for titles and axis labels.

The bundled themes are stolen shamelessly fromimplementations of the ones included with Gruff

Theme Example

Below is the same graph rendered first using the default monochrome theme, and the other rendered using the ‘keynote’ theme.

Monochrome Themed Example

Example of Keynote Theme

Keynote Themed Example

Example of Keynote Theme