Theme Module
This submodule contains the Theme class definition.
- class chromaquant.theme.theme.CellStyle(font_name: str = 'Calibri', font_size: int = 11, font_bold: bool = False, font_italic: bool = False, font_vert_align: Literal['baseline', 'subscript', 'superscript', None] = None, font_underline: str | None = None, font_strike: bool = False, font_color: str = '000000', fill_type: str | None = None, fill_start_color: str = 'FFFFFF', fill_end_color: str = 'FFFFFF', border_left: dict[str, str | None] = {'border_style': None, 'color': '000000'}, border_right: dict[str, str | None] = {'border_style': None, 'color': '000000'}, border_top: dict[str, str | None] = {'border_style': None, 'color': '000000'}, border_bottom: dict[str, str | None] = {'border_style': None, 'color': '000000'}, border_diagonal: dict[str, str | None] = {'border_style': None, 'color': '000000'}, border_diagonal_up: bool = False, border_diagonal_down: bool = False, border_outline: bool = False, border_vertical: dict[str, str | None] = {'border_style': None, 'color': '000000'}, border_horizontal: dict[str, str | None] = {'border_style': None, 'color': '000000'}, alignment_horizontal: str = 'general', alignment_vertical: str = 'bottom', alignment_text_rotation: int = 0, alignment_wrap_text: bool = False, alignment_shrink_to_fit: bool = False, alignment_indent: float = 0, protection_locked: bool = True, protection_hidden: bool = False, number_format: str = 'General')
CellStyle objects contain details about how to format each cell style.
Parameters
- font_namestr, optional
Name of the font to use, by default ‘Calibri’
- font_sizeint, optional
Size of the font, by default 11
- font_boldbool, optional
Whether to bold the font, by default False
- font_italicbool, optional
Whether to italicize the font, by default False
- font_vert_align{‘baseline’, ‘subscript’, ‘superscript’, None}, optional
Font alignment, by default None
- font_underline{‘single’, ‘double’, ‘singleAccounting’, ‘doubleAccounting’, None}, optional
Font underline style, by default None
- font_strikebool, optional
Whether to strikethrough, by default False
- font_colorstr, optional
The color of the font, by default ‘000000’
- fill_type{‘darkGray’, ‘darkUp’, ‘lightDown’, ‘darkGrid’, ‘darkHorizontal’, ‘lightTrellis’, ‘lightVertical’, ‘gray0625’, ‘gray125’, ‘lightGray’, ‘lightUp’, ‘darkDown’, ‘darkTrellis’, ‘lightGrid’, ‘mediumGray’, ‘solid’, ‘darkVertical’, ‘lightHorizontal’, ‘path’, ‘linear’}, optional
The fill type to use for the cell background, by default None
- fill_start_colorstr, optional
The starting color for the cell background, by default ‘FFFFFF’
- fill_end_colorstr, optional
The ending color for the cell background, by default ‘FFFFFF’
- border_leftdict[str, str | None], optional
Style and color of the vertical cell border. Style must be one of {‘mediumDashed’, ‘mediumDashDotDot’, ‘dashDot’, ‘dashed’, ‘slantDashDot’, ‘dashDotDot’, ‘thick’, ‘thin’, ‘dotted’, ‘double’, ‘medium’, ‘hair’, ‘mediumDashDot’}. By default {‘border_style’: None, ‘color’: ‘000000’}
- border_rightdict[str, str | None], optional
Style and color of the vertical cell border. Style must be one of {‘mediumDashed’, ‘mediumDashDotDot’, ‘dashDot’, ‘dashed’, ‘slantDashDot’, ‘dashDotDot’, ‘thick’, ‘thin’, ‘dotted’, ‘double’, ‘medium’, ‘hair’, ‘mediumDashDot’}. By default {‘border_style’: None, ‘color’: ‘000000’}
- border_topdict[str, str | None], optional
Style and color of the vertical cell border. Style must be one of {‘mediumDashed’, ‘mediumDashDotDot’, ‘dashDot’, ‘dashed’, ‘slantDashDot’, ‘dashDotDot’, ‘thick’, ‘thin’, ‘dotted’, ‘double’, ‘medium’, ‘hair’, ‘mediumDashDot’}. By default {‘border_style’: None, ‘color’: ‘000000’}
- border_bottomdict[str, str | None], optional
Style and color of the vertical cell border. Style must be one of {‘mediumDashed’, ‘mediumDashDotDot’, ‘dashDot’, ‘dashed’, ‘slantDashDot’, ‘dashDotDot’, ‘thick’, ‘thin’, ‘dotted’, ‘double’, ‘medium’, ‘hair’, ‘mediumDashDot’}. By default {‘border_style’: None, ‘color’: ‘000000’}
- border_diagonaldict[str, str | None], optional
Style and color of the vertical cell border. Style must be one of {‘mediumDashed’, ‘mediumDashDotDot’, ‘dashDot’, ‘dashed’, ‘slantDashDot’, ‘dashDotDot’, ‘thick’, ‘thin’, ‘dotted’, ‘double’, ‘medium’, ‘hair’, ‘mediumDashDot’}. By default {‘border_style’: None, ‘color’: ‘000000’}
- border_diagonal_upbool, optional
Whether to draw the diagonal from bottom-left to top-right, by default False
- border_diagonal_downbool, optional
Whether to draw the diagonal from top-left to bottom-right, by default False
- border_outlinebool, optional
Whether to draw the cell outline, by default False
- border_verticaldict[str, str | None], optional
Style and color of the vertical cell border. Style must be one of {‘mediumDashed’, ‘mediumDashDotDot’, ‘dashDot’, ‘dashed’, ‘slantDashDot’, ‘dashDotDot’, ‘thick’, ‘thin’, ‘dotted’, ‘double’, ‘medium’, ‘hair’, ‘mediumDashDot’}. By default {‘border_style’: None, ‘color’: ‘000000’}
- border_horizontaldict[str, str | None], optional
Style and color of the vertical cell border. Style must be one of {‘mediumDashed’, ‘mediumDashDotDot’, ‘dashDot’, ‘dashed’, ‘slantDashDot’, ‘dashDotDot’, ‘thick’, ‘thin’, ‘dotted’, ‘double’, ‘medium’, ‘hair’, ‘mediumDashDot’}. By default {‘border_style’: None, ‘color’: ‘000000’}
- alignment_horizontal{‘left’, ‘center’, ‘right’, ‘general’, ‘fill’, ‘justify’, ‘centerContinuous’, ‘distributed’}, optional
The horizontal alignment setting, by default ‘general’
- alignment_vertical{‘top’, ‘center’, ‘bottom’, ‘justify’, ‘distributed’}, optional
The vertical alignment setting, by default ‘bottom’
- alignment_text_rotationint, optional
The angle, in degrees, by which to rotate text. Can only be integers from 0-180, by default 0
- alignment_wrap_textbool, optional
Whether to wrap text, by default False
- alignment_shrink_to_fitbool, optional
Whether to shrink the text to fit cells, by default False
- alignment_indentfloat, optional
Indent of the text in cells, by default 0
- protection_lockedbool, optional
Whether to lock cells, by default True
- protection_hiddenbool, optional
Whether to hide cells, by default False
- number_formatstr, optional
The formatting code to use in number formatting, by default ‘General’
- property alignment
- property border
- property fill
- property font
- property number_format
- point_to(column_id: str)
- property protection
- class chromaquant.theme.theme.ChartStyle(chart_outline: bool = True, chart_vary_colors: bool = True, chart_rounded_corners: bool = True, plot_area_draw_outline: bool = False, plot_area_outline_width: float | None = None, plot_area_outline_style: str | None = None, plot_area_outline_color: str | None = None, legend_position: str | None = None, legend_overlay: bool = True, title: str | None = None, title_overlay: bool = True, title_font_name: str | None = None, title_font_size: float | int | None = None, x_title: str | None = None, x_overlay: bool = True, x_font_name: str | None = None, x_font_size: float | int | None = None, x_draw_major_grid: bool = True, x_draw_minor_grid: bool = False, x_show_numbers: bool = False, x_tick_major_style: str | None = None, x_tick_minor_style: str | None = None, x_tick_major_unit: float | None = None, x_tick_minor_unit: float | None = None, y_title: str | None = None, y_overlay: bool = True, y_font_name: str | None = None, y_font_size: float | int | None = None, y_draw_major_grid: bool = True, y_draw_minor_grid: bool = False, y_show_numbers: bool = False, y_tick_major_style: str | None = None, y_tick_minor_style: str | None = None, y_tick_major_unit: float | None = None, y_tick_minor_unit: float | None = None)
ChartStyle objects contain details about how to format charts.
Parameters
- chart_outlinebool, optional
Whether to draw an outline around the chart, by default True
- chart_vary_colorsbool, optional
Whether to vary colors in individual series, by default True
- chart_rounded_cornersbool, optional
Whether to round outer chart corners, by default True
- plot_area_draw_outlinebool, optional
Whether to draw an outline around the plot area, by default False
- plot_area_outline_widthfloat | None, optional
The width of the plot area outline in points, by default None
- plot_area_outline_style{‘thinThick’, ‘tri’, ‘sng’, ‘thickThin’, ‘dbl’, None}, optional
The plot area outline style, by default None
- plot_area_outline_colorstr | None, optional
The plot area outline color, by default None
- legend_position{‘r’, ‘l’, ‘t’, ‘b’, ‘tr’, None}, optional
The legend position, by default None
- legend_overlaybool, optional
Whether to overlay the legend, by default True
- titlestr | None, optional
The chart title, by default None
- title_overlaybool, optional
Whether to overlay the chart title, by default True
- title_font_namestr | None, optional
The latin font to use for the chart title, by default None
- title_font_sizefloat | int | None, optional
The chart title font size, by default None
- x_titlestr | None, optional
The x-axis title, by default None
- x_overlaybool, optional
Whether to overlay the x-axis title, by default True
- x_font_namestr | None, optional
The latin font to use for the x-axis title, by default None
- x_font_sizefloat | int | None, optional
The x-axis title font size, by default None
- x_draw_major_gridbool, optional
Whether to draw major x-axis gridlines, by default True
- x_draw_minor_gridbool, optional
Whether to draw minor x-axis gridlines, by default False
- x_show_numbersbool, optional
Whether to show x-axis numbers, by default False
- x_tick_major_style{‘in’, ‘out’, ‘cross’, None}, optional
The x-axis major tick mark style, by default None
- x_tick_minor_style{‘in’, ‘out’, ‘cross’, None}, optional
The x-axis minor tick mark style, by default None
- x_tick_major_unitfloat | None, optional
The x-axis major unit, by default None
- x_tick_minor_unitfloat | None, optional
The x-axis minor unit, by default None
- y_titlestr | None, optional
The y-axis title, by default None
- y_overlaybool, optional
Whether to overlay the y-axis title, by default True
- y_font_namestr | None, optional
The latin font to use for the y-axis title, by default None
- y_font_sizefloat | int | None, optional
The y-axis title font size, by default None
- y_draw_major_gridbool, optional
Whether to draw major y-axis gridlines, by default True
- y_draw_minor_gridbool, optional
Whether to draw minor y-axis gridlines, by default False
- y_show_numbersbool, optional
Whether to show y-axis numbers, by default False
- y_tick_major_style{‘in’, ‘out’, ‘cross’, None}, optional
The y-axis major tick mark style, by default None
- y_tick_minor_style{‘in’, ‘out’, ‘cross’, None}, optional
The y-axis minor tick mark style, by default None
- y_tick_major_unitfloat | None, optional
The y-axis major unit, by default None
- y_tick_minor_unitfloat | None, optional
The y-axis minor unit, by default None