backtrader.bokeh.schemes package

Bokeh theme system.

Provides multiple theme configurations: - Blackly: Dark theme - Tradimo: Light theme

class backtrader.bokeh.schemes.Scheme[source]

Bases: object

Bokeh plotting theme base class.

Defines all plotting-related style parameters. Subclasses can customize styles by overriding the _set_params method.

Attribute categories: - Color configuration: barup, bardown, volup, voldown, etc. - Background configuration: background_fill, body_background_color, etc. - Grid configuration: grid_line_color, etc. - Text configuration: axis_text_color, etc. - Crosshair: crosshair_line_color, etc. - Chart configuration: plot_sizing_mode, plot_height, etc.

__init__()[source]

Initialize the scheme with default parameters.

get_color(name, default=None)[source]

Get color configuration.

Parameters:
  • name – Color name

  • default – Default value

Returns:

Color value

set_color(name, value)[source]

Set color configuration.

Parameters:
  • name – Color name

  • value – Color value

copy()[source]

Create a copy of the theme.

Returns:

New theme instance

class backtrader.bokeh.schemes.Blackly[source]

Bases: Scheme

Dark theme.

Dark background with light text, suitable for night use or dark interfaces.

class backtrader.bokeh.schemes.Tradimo[source]

Bases: Blackly

Light theme.

Light background with dark text, suitable for daytime use or light interfaces. Inherits from Blackly to maintain consistent parameter structure.

Submodules