Skip to content
Back to top
View this page

# Theme

This module contains all style configuration for rendering charts. Setting any of these variables will change how charts are rendered.

leather.theme.default_chart_width = 800

  Default chart width

leather.theme.default_chart_height = 600

  Default chart height

leather.theme.background_color = '#f9f9f9'

  Chart background color

leather.theme.margin = 0.05

  Chart margin as a percent of chart width

leather.theme.title_color = '#333'

  Chart title text color

leather.theme.title_font_family = 'Monaco'

  Chart title font

leather.theme.title_font_size = 16

  Chart title font size

leather.theme.title_font_char_height = 16

  Approximate glyph height of the title font

leather.theme.title_font_char_width = 9

  Approximate glyph width of the title font

leather.theme.title_gap = 4

  Gap between title and rest of chart

leather.theme.legend_color = '#666'

  Chart legend text color

leather.theme.legend_font_family = 'Monaco'

  Chart legend font

leather.theme.legend_font_size = 14

  Chart legend font size

leather.theme.legend_font_char_height = 14

  Approximate glyph height of the legend font

leather.theme.legend_font_char_width = 8

  Approximate glyph width of the legend font

leather.theme.legend_gap = 4

  Gap between legend and rest of chart

leather.theme.legend_bubble_size = 10

  Size of the bubble next to an legend item

leather.theme.legend_bubble_offset = 4

  Offset from the top of the glyph

leather.theme.axis_title_color = '#666'

  Axis title text color

leather.theme.axis_title_font_family = 'Monaco'

  Axis title font

leather.theme.axis_title_font_size = 14

  Axis title font size

leather.theme.axis_title_font_char_height = 14

  Approximate glyph height of the axis title font

leather.theme.axis_title_font_char_width = 8

  Approximate glyph width of the axis title font

leather.theme.axis_title_gap = 16

  Gap between axis title and rest of chart

leather.theme.tick_width = 1

  Width of a tick mark

leather.theme.tick_size = 4

  Length of a tick mark

leather.theme.tick_color = '#eee'

  Color of tick marks

leather.theme.zero_color = '#a8a8a8'

  Color of the zero tick mark

leather.theme.label_color = '#9c9c9c'

  Color of tick label text

leather.theme.tick_font_family = 'Monaco'

  Tick label font

leather.theme.tick_font_size = 14

  Tick label font size

leather.theme.tick_font_char_height = 14

  Approximate glyph height of the tick label font

leather.theme.tick_font_char_width = 8

  Approximate glyph width of the tick label font

leather.theme.default_series_colors = ['#e41a1c', '#377eb8', '#4daf4a', '#984ea3', '#ff7f00']

  Default sequence of `Shape` colors

leather.theme.default_dot_radius = 3

  Default `Dots` radius

leather.theme.default_line_width = 2

  Default `Line` width

leather.theme.default_stroke_dasharray = 'none'

  Default stroke-dasharray property when using dashes on a line