backtrader.bokeh.schemes.scheme module

Bokeh theme base class.

Defines all plotting-related style parameters.

class backtrader.bokeh.schemes.scheme.Scheme[源代码]

基类: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__()[源代码]

Initialize the scheme with default parameters.

get_color(name, default=None)[源代码]

Get color configuration.

参数:
  • name -- Color name

  • default -- Default value

返回:

Color value

set_color(name, value)[源代码]

Set color configuration.

参数:
  • name -- Color name

  • value -- Color value

copy()[源代码]

Create a copy of the theme.

返回:

New theme instance