Skip to content

Typings Module

datachart.typings

Module containing the typings.

The typings module contains the typings for all chart components. The module is intended to contain the typings for easier input value format checkup.

ATTRIBUTE DESCRIPTION
ChartAttrs

The union of all chart attributes.

CLASS DESCRIPTION
ChartCommonAttrs

The chart attributes common to all chart types.

VLinePlotAttrs

The vertical line plot attributes.

HLinePlotAttrs

The horizontal line plot attributes.

LineChartAttrs

The line chart attributes.

LineSingleChartAttrs

The single chart attributes for the line chart.

LineDataPointAttrs

The data point attributes for the line chart.

BarChartAttrs

The bar chart attributes.

BarSingleChartAttrs

The single chart attributes for the bar chart.

BarDataPointAttrs

The data point attributes for the bar chart.

HistogramChartAttrs

The histogram chart attributes.

HistogramSingleChartAttrs

The single chart attributes for the histogram chart.

HistDataPointAttrs

The data point attributes for the histogram chart.

HeatmapChartAttrs

The heatmap chart attributes.

HeatmapSingleChartAttrs

The single chart attributes for the heatmap chart.

HeatmapColorbarAttrs

The heatmap colorbar attributes.

StyleAttrs

The style typing.

ColorGeneralStyleAttrs

The typing for the general color style.

FontStyleAttrs

The typing for the font style.

AxesStyleAttrs

The typing for the axes style.

LegendStyleAttrs

The typing for the legend style.

AreaStyleAttrs

The typing for the area style.

GridStyleAttrs

The typing for the grid style.

LineStyleAttrs

The typing for the line style.

BarStyleAttrs

The typing for the bar style.

HistStyleAttrs

The typing for the histogram style.

VLineStyleAttrs

The typing for the vertical line style.

HLineStyleAttrs

The typing for the horizontal line style.

HeatmapStyleAttrs

The typing for the heatmap style.

Chart Typings

Common Chart Typings

datachart.typings.ChartAttrs

ChartAttrs = Union[
    LineChartAttrs,
    BarChartAttrs,
    HistogramChartAttrs,
    HeatmapChartAttrs,
]

The union of all chart attributes.

datachart.typings.ChartCommonAttrs

Bases: TypedDict

The chart attributes common to all chart types.

ATTRIBUTE DESCRIPTION
title

The title of the charts.

TYPE: Union[str, None]

xlabel

The xlabel of the charts.

TYPE: Union[str, None]

ylabel

The ylabel of the charts.

TYPE: Union[str, None]

figsize

The size of the figure.

TYPE: Union[FIG_SIZE, Tuple[float, float], None]

xmin

Determine the minimum x-axis value.

TYPE: Union[int, float, None]

xmax

Determine the maximum x-axis value.

TYPE: Union[int, float, None]

ymin

Determine the minimum y-axis value.

TYPE: Union[int, float, None]

ymax

Determine the maximum y-axis value.

TYPE: Union[int, float, None]

show_legend

Whether or not to show the legend.

TYPE: Union[bool, None]

show_grid

Determine which grid lines to show.

TYPE: Union[SHOW_GRID, str, None]

aspect_ratio

The aspect ratio of the charts.

TYPE: Union[str, None]

subplots

Whether or not to create a separate subplot for each chart.

TYPE: Union[bool, None]

max_cols

The maximum number of columns in the subplots. Active only when subplots is True.

TYPE: Union[int, None]

sharex

Whether or not to share the x-axis in the subplots. Active only when subplots is True.

TYPE: Union[bool, None]

sharey

Whether or not to share the y-axis in the subplots. Active only when subplots is True.

TYPE: Union[bool, None]

datachart.typings.VLinePlotAttrs

Bases: TypedDict

The vertical line plot attributes.

ATTRIBUTE DESCRIPTION
x

The x-axis position of the line.

TYPE: Union[int, float]

ymin

The minimum y-axis position value.

TYPE: Union[int, float, None]

ymax

The maximum y-axis position value.

TYPE: Union[int, float, None]

style

The vertical line style attributes.

TYPE: Union[VLineStyleAttrs, None]

label

The label of the vertical line.

TYPE: Union[str, None]

datachart.typings.HLinePlotAttrs

Bases: TypedDict

The horizontal line plot attributes.

ATTRIBUTE DESCRIPTION
y

The x-axis position of the line.

TYPE: Union[int, float]

xmin

The minimum y-axis position value.

TYPE: Union[int, float, None]

xmax

The maximum y-axis position value.

TYPE: Union[int, float, None]

style

The horizontal line style attributes.

TYPE: Union[HLineStyleAttrs, None]

label

The label of the horizontal line.

TYPE: Union[str, None]

Line Chart Typings

datachart.typings.LineChartAttrs

Bases: ChartCommonAttrs

The line chart attributes.

ATTRIBUTE DESCRIPTION
charts

The line chart definitions.

TYPE: Union[LineSingleChartAttrs, List[LineSingleChartAttrs]]

show_yerr

Whether or not to show the y-axis errors.

TYPE: Union[bool, None]

show_area

Whether or not to show the area under the lines.

TYPE: Union[bool, None]

scalex

The scale of the x-axis.

TYPE: Union[SCALE, str, None]

scaley

The scale of the y-axis.

TYPE: Union[SCALE, str, None]

datachart.typings.LineSingleChartAttrs

Bases: TypedDict

The single chart attributes for the line chart.

ATTRIBUTE DESCRIPTION
data

The list of data points defining the line chart.

TYPE: List[LineDataPointAttrs]

subtitle

The subtitle of the line chart. Also used as the label in the legend.

TYPE: Union[str, None]

xlabel

The xlabel of the line chart.

TYPE: Union[str, None]

ylabel

The ylabel of the line chart.

TYPE: Union[str, None]

style

The style of the line chart.

TYPE: Union[LineStyleAttrs, None]

xticks

The xtick positions list.

TYPE: Union[int, float, None]

xticklabels

The xtick labels.

TYPE: Union[List[str], None]

xtickrotate

The xtick rotation value.

TYPE: Union[int, None]

yticks

the ytick position list.

TYPE: Union[int, float, None]

yticklabels

The ytick labels.

TYPE: Union[List[str], None]

ytickrotate

The ytick rotation value.

TYPE: Union[int, None]

vlines

The vertical lines to be plot.

TYPE: Union[VLinePlotAttrs, List[VLinePlotAttrs], None]

hlines

The horizontal lines to be plot.

TYPE: Union[HLinePlotAttrs, List[HLinePlotAttrs], None]

x

The key name in data that contains the x-axis value. Defaults to "x".

TYPE: Union[str, None]

y

The key name in data that contains the y-axis value. Defaults to "y".

TYPE: Union[str, None]

yerr

The key name in data that contains the y-axis error value. Defaults to "yerr".

TYPE: Union[str, None]

datachart.typings.LineDataPointAttrs

Bases: TypedDict

The data point attributes for the line chart.

ATTRIBUTE DESCRIPTION
x

The x-axis value.

TYPE: Union[int, float]

y

The y-axis value.

TYPE: Union[int, float]

yerr

The y-axis error value.

TYPE: Optional[Union[int, float]]

Bar Chart Typings

datachart.typings.BarChartAttrs

Bases: ChartCommonAttrs

The bar chart attributes.

ATTRIBUTE DESCRIPTION
charts

The bar chart definitions.

TYPE: Union[BarSingleChartAttrs, List[BarSingleChartAttrs]]

show_yerr

Whether or not to show the y-axis errors.

TYPE: Union[bool, None]

orientation

The orientation of the bar charts.

TYPE: Union[ORIENTATION, str, None]

scaley

The scale of the y-axis.

TYPE: Union[SCALE, str, None]

datachart.typings.BarSingleChartAttrs

Bases: TypedDict

The single chart attributes for the bar chart.

ATTRIBUTE DESCRIPTION
data

The list of data points defining the bar chart.

TYPE: List[BarDataPointAttrs]

subtitle

The subtitle of the bar chart. Also used as the label in the legend.

TYPE: Union[str, None]

xlabel

The xlabel of the bar chart.

TYPE: Union[str, None]

ylabel

The ylabel of the bar chart.

TYPE: Union[str, None]

style

The style of the bar chart.

TYPE: Union[BarStyleAttrs, None]

xticks

The xtick positions list.

TYPE: Union[int, float, None]

xticklabels

The xtick labels.

TYPE: Union[List[str], None]

xtickrotate

The xtick rotation value.

TYPE: Union[int, None]

yticks

the ytick position list.

TYPE: Union[int, float, None]

yticklabels

The ytick labels.

TYPE: Union[List[str], None]

ytickrotate

The ytick rotation value.

TYPE: Union[int, None]

vlines

The vertical lines to be plot.

TYPE: Union[VLinePlotAttrs, List[VLinePlotAttrs], None]

hlines

The horizontal lines to be plot.

TYPE: Union[HLinePlotAttrs, List[HLinePlotAttrs], None]

label

The key name in data that contains the label value. Defaults to "label".

TYPE: Union[str, None]

y

The key name in data that contains the y-axis value. Defaults to "y".

TYPE: Union[str, None]

yerr

The key name in data that contains the y-axis error value. Defaults to "yerr".

TYPE: Union[str, None]

datachart.typings.BarDataPointAttrs

Bases: TypedDict

The data point attributes for the bar chart.

ATTRIBUTE DESCRIPTION
label

The label.

TYPE: str

y

The y-axis value.

TYPE: Union[int, float]

yerr

The y-axis error value.

TYPE: Optional[Union[int, float]]

Histogram Typings

datachart.typings.HistogramChartAttrs

Bases: ChartCommonAttrs

The histogram chart attributes.

ATTRIBUTE DESCRIPTION
charts

The histogram chart definitions.

TYPE: Union[HistogramSingleChartAttrs, List[HistogramSingleChartAttrs]]

orientation

The orientation of the histogram charts.

TYPE: Union[ORIENTATION, str, None]

num_bins

The number of bins the data points are split in to create the histogram.

TYPE: Union[int, None]

show_density

Whether or not to plot the density histogram.

TYPE: Union[bool, None]

show_cumulative

Whether or not to plot the cumulative histogram.

TYPE: Union[bool, None]

scaley

The scale of the y-axis.

TYPE: Union[SCALE, str, None]

datachart.typings.HistogramSingleChartAttrs

Bases: TypedDict

The single chart attributes for the histogram chart.

ATTRIBUTE DESCRIPTION
data

The list of data points defining the histogram chart.

TYPE: List[HistDataPointAttrs]

subtitle

The subtitle of the histogram chart. Also used as the label in the legend.

TYPE: Union[str, None]

xlabel

The xlabel of the histogram chart.

TYPE: Union[str, None]

ylabel

The ylabel of the histogram chart.

TYPE: Union[str, None]

style

The style of the histogram chart.

TYPE: Union[HistStyleAttrs, None]

xticks

The xtick positions list.

TYPE: Union[int, float, None]

xticklabels

The xtick labels.

TYPE: Union[List[str], None]

xtickrotate

The xtick rotation value.

TYPE: Union[int, None]

yticks

the ytick position list.

TYPE: Union[int, float, None]

yticklabels

The ytick labels.

TYPE: Union[List[str], None]

ytickrotate

The ytick rotation value.

TYPE: Union[int, None]

vlines

The vertical lines to be plot.

TYPE: Union[VLinePlotAttrs, List[VLinePlotAttrs], None]

hlines

The horizontal lines to be plot.

TYPE: Union[HLinePlotAttrs, List[HLinePlotAttrs], None]

x

The key name in data that contains the x-axis value. Defaults to "x".

TYPE: Union[str, None]

datachart.typings.HistDataPointAttrs

Bases: TypedDict

The data point attributes for the histogram chart.

ATTRIBUTE DESCRIPTION
x

The x-axis value.

TYPE: Union[int, float]

Heatmap Typings

datachart.typings.HeatmapChartAttrs

Bases: ChartCommonAttrs

The heatmap chart attributes.

ATTRIBUTE DESCRIPTION
charts

The heatmap chart definitions.

TYPE: Union[HeatmapSingleChartAttrs, List[HeatmapSingleChartAttrs]]

show_colorbars

Whether or not to plot the density histogram.

TYPE: Union[bool, None]

show_heatmap_values

Whether or not to plot the heatmap values.

TYPE: Union[bool, None]

datachart.typings.HeatmapSingleChartAttrs

Bases: TypedDict

The single chart attributes for the heatmap chart.

ATTRIBUTE DESCRIPTION
data

The list of data points defining the heatmap chart.

TYPE: List[List[Union[int, float, None]]]

subtitle

The subtitle of the heatmap chart. Also used as the label in the legend.

TYPE: Union[str, None]

xlabel

The xlabel of the heatmap chart.

TYPE: Union[str, None]

ylabel

The ylabel of the heatmap chart.

TYPE: Union[str, None]

style

The style of the heatmap chart.

TYPE: Union[HeatmapStyleAttrs, None]

norm

The value normalization.

TYPE: Union[NORMALIZE, str, None]

vmin

The minimum value to normalize the data points.

TYPE: Union[str, None]

vmax

The maximum value to normalize the data points.

TYPE: Union[str, None]

xticks

The xtick positions list.

TYPE: Union[int, float, None]

xticklabels

The xtick labels.

TYPE: Union[List[str], None]

xtickrotate

The xtick rotation value.

TYPE: Union[int, None]

yticks

the ytick position list.

TYPE: Union[int, float, None]

yticklabels

The ytick labels.

TYPE: Union[List[str], None]

ytickrotate

The ytick rotation value.

TYPE: Union[int, None]

colorbar

The heatmap colorbar attributes.

TYPE: Union[HeatmapColorbarAttrs, None]

datachart.typings.HeatmapColorbarAttrs

Bases: TypedDict

The heatmap colorbar attributes.

ATTRIBUTE DESCRIPTION
orientation

The orientation.

TYPE: Union[ORIENTATION, str, None]

Style Typings

datachart.typings.ColorGeneralStyleAttrs

Bases: TypedDict

The typing for the general color style.

ATTRIBUTE DESCRIPTION
color_general_singular

The general color for the singular-typed charts.

TYPE: Union[COLORS, str, None]

color_general_multiple

The general color for the multiple-typed charts.

TYPE: Union[COLORS, str, None]

datachart.typings.FontStyleAttrs

Bases: TypedDict

The typing for the font style.

ATTRIBUTE DESCRIPTION
font_general_family

The general font family.

TYPE: Union[str, None]

font_general_sansserif

The general sans-serif font.

TYPE: Union[List[str], None]

font_general_color

The general font color.

TYPE: Union[str, None]

font_general_size

The general font size.

TYPE: Union[int, float, str, None]

font_general_style

The general font style.

TYPE: Union[FONT_STYLE, str, None]

font_general_weight

The general font weight.

TYPE: Union[FONT_WEIGHT, str, None]

font_title_size

The title font size.

TYPE: Union[int, float, str, None]

font_title_color

The title font color.

TYPE: Union[str, None]

font_title_style

The title font style.

TYPE: Union[FONT_STYLE, str, None]

font_title_weight

The title font weight.

TYPE: Union[FONT_WEIGHT, str, None]

font_subtitle_size

The subtitle font size.

TYPE: Union[int, float, str, None]

font_subtitle_color

The subtitle font color.

TYPE: Union[str, None]

font_subtitle_style

The subtitle font style.

TYPE: Union[FONT_STYLE, None]

font_subtitle_weight

The subtitle font weight.

TYPE: Union[FONT_WEIGHT, None]

font_xlabel_size

The xlabel font size.

TYPE: Union[int, float, str, None]

font_xlabel_color

The xlabel font color.

TYPE: Union[str, None]

font_xlabel_style

The xlabel font style.

TYPE: Union[FONT_STYLE, str, None]

font_xlabel_weight

The xlabel font weight.

TYPE: Union[FONT_WEIGHT, str, None]

font_ylabel_size

The ylabel font size.

TYPE: Union[int, float, str, None]

font_ylabel_color

The ylabel font color.

TYPE: Union[str, None]

font_ylabel_style

The ylabel font style.

TYPE: Union[FONT_STYLE, str, None]

font_ylabel_weight

The ylabel font weight.

TYPE: Union[FONT_WEIGHT, str, None]

datachart.typings.AxesStyleAttrs

Bases: TypedDict

The typing for the axes style.

ATTRIBUTE DESCRIPTION
axes_spines_top_visible

Make the top plot spine visible.

TYPE: Union[bool, None]

axes_spines_right_visible

Make the right plot spine visible.

TYPE: Union[bool, None]

axes_spines_bottom_visible

Make the bottom plot spine visible.

TYPE: Union[bool, None]

axes_spines_left_visible

Make the left plot spine visible.

TYPE: Union[bool, None]

axes_spines_width

The width of the spines.

TYPE: Union[int, float, None]

axes_spines_zorder

The zorder of the spines.

TYPE: Union[int, None]

axes_ticks_length

The length of the ticks.

TYPE: Union[int, float, None]

axes_ticks_label_size

The size of the tick labels.

TYPE: Union[int, float, None]

datachart.typings.LegendStyleAttrs

Bases: TypedDict

The typing for the legend style.

ATTRIBUTE DESCRIPTION
plot_legend_shadow

Show the legends shadow.

TYPE: Union[bool, None]

plot_legend_frameon

Show the legends frame.

TYPE: Union[bool, None]

plot_legend_alignment

The legend alignment.

TYPE: Union[LEGEND_ALIGN, str, None]

plot_legend_font_size

The font size within the legend.

TYPE: Union[int, float, str, None]

plot_legend_title_size

The title size of the legend.

TYPE: Union[int, float, str, None]

plot_legend_label_color

The label color of the legend.

TYPE: Union[str, None]

datachart.typings.AreaStyleAttrs

Bases: TypedDict

The typing for the area style.

ATTRIBUTE DESCRIPTION
plot_area_alpha

The alpha value of the area.

TYPE: Union[float, None]

plot_area_color

The color of the area.

TYPE: Union[str, None]

plot_area_linewidth

The line width of the area.

TYPE: Union[int, float, None]

plot_area_hatch

The hatch style of the area.

TYPE: Union[HATCH_STYLE, str, None]

plot_area_zorder

The zorder of the area.

TYPE: Union[int, None]

datachart.typings.GridStyleAttrs

Bases: TypedDict

The typing for the grid style.

ATTRIBUTE DESCRIPTION
plot_grid_alpha

The alpha value of the grid.

TYPE: Union[float, None]

plot_grid_color

The color of the grid.

TYPE: Union[str, None]

plot_grid_linewidth

The line width of the grid.

TYPE: Union[int, float, None]

plot_grid_linestyle

The line style of the grid.

TYPE: Union[LINE_STYLE, str, None]

plot_grid_zorder

The zorder of the grid.

TYPE: Union[int, None]

datachart.typings.LineStyleAttrs

Bases: TypedDict

The typing for the line chart style.

ATTRIBUTE DESCRIPTION
plot_line_color

The line color.

TYPE: Union[str, None]

plot_line_alpha

The alpha value of the line.

TYPE: Union[float, None]

plot_line_style

The line style.

TYPE: Union[LINE_STYLE, str, None]

plot_line_marker

The line marker.

TYPE: Union[LINE_MARKER, str, None]

plot_line_width

The line width.

TYPE: Union[int, float, None]

plot_line_drawstyle

The line draw style.

TYPE: Union[LINE_DRAW_STYLE, str, None]

plot_line_zorder

The zorder of the line.

TYPE: Union[int, float, None]

plot_xticks_label_rotate

The label rotation of the xticks in the line chart.

TYPE: Union[int, float, None]

plot_yticks_label_rotate

The label rotation of the yticks in the line chart.

TYPE: Union[int, float, None]

datachart.typings.BarStyleAttrs

Bases: TypedDict

The typing for the bar chart style.

ATTRIBUTE DESCRIPTION
plot_bar_color

The bar color.

TYPE: Union[str, None]

plot_bar_alpha

The alpha value of the bar.

TYPE: Union[float, None]

plot_bar_width

The width of the bar.

TYPE: Union[int, float, None]

plot_bar_zorder

The zorder of the bar.

TYPE: Union[int, float, None]

plot_bar_hatch

The hatch style of the bar.

TYPE: Union[HATCH_STYLE, str, None]

plot_bar_edge_width

The edge width of the bar.

TYPE: Union[int, float, None]

plot_bar_edge_color

The edge color of the bar.

TYPE: Union[str, None]

plot_bar_error_color

The color of the error line of the bar.

TYPE: Union[str, None]

plot_xticks_label_rotate

The label rotation of the xticks in the bar chart.

TYPE: Union[int, float, None]

plot_yticks_label_rotate

The label rotation of the yticks in the bar chart.

TYPE: Union[int, float, None]

datachart.typings.HistStyleAttrs

Bases: TypedDict

The typing for the histogram chart style.

ATTRIBUTE DESCRIPTION
plot_hist_color

The color of the histogram.

TYPE: Union[str, None]

plot_hist_alpha

The alpha value of the histogram.

TYPE: Union[float, None]

plot_hist_zorder

The zorder of the histogram.

TYPE: Union[int, float, None]

plot_hist_fill

The fill of the histogram.

TYPE: Union[str, None]

plot_hist_hatch

The hatch style in the histogram.

TYPE: Union[HATCH_STYLE, str, None]

plot_hist_type

The type of the histogram.

TYPE: Union[HISTOGRAM_TYPE, str, None]

plot_hist_align

The alignment of the histogram.

TYPE: Union[str, None]

plot_hist_edge_width

The edge width of the histogram.

TYPE: Union[int, float, None]

plot_hist_edge_color

The edge color of the histogram.

TYPE: Union[str, None]

plot_xticks_label_rotate

The label rotation of the xticks in the histogram chart.

TYPE: Union[int, float, None]

plot_yticks_label_rotate

The label rotation of the yticks in the histogram chart.

TYPE: Union[int, float, None]

datachart.typings.VLineStyleAttrs

Bases: TypedDict

The typing for the vertical line style.

ATTRIBUTE DESCRIPTION
plot_vline_color

The color of the vertical line.

TYPE: Union[str, None]

plot_vline_style

The style of the vertical line.

TYPE: Union[LINE_STYLE, str, None]

plot_vline_width

The width of the vertical line.

TYPE: Union[int, float, None]

plot_vline_alpha

The alpha value of the vertical line.

TYPE: Union[float, None]

datachart.typings.HLineStyleAttrs

Bases: TypedDict

The typing for the horizontal line style.

ATTRIBUTE DESCRIPTION
plot_hline_color

The color of the horizontal line.

TYPE: Union[str, None]

plot_hline_style

The style of the horizontal line.

TYPE: Union[LINE_STYLE, str, None]

plot_hline_width

The width of the horizontal line.

TYPE: Union[int, float, None]

plot_hline_alpha

The alpha value of the horizontal line.

TYPE: Union[float, None]

datachart.typings.HeatmapStyleAttrs

Bases: TypedDict

The typing for the heatmap chart style.

ATTRIBUTE DESCRIPTION
plot_heatmap_cmap

The color map of the heatmap.

TYPE: Union[str, colors.LinearSegmentedColormap, None]

plot_heatmap_alpha

The alpha value of the heatmap.

TYPE: Union[float, None]

plot_heatmap_font_size

The font size of the heatmap.

TYPE: Union[int, float, str, None]

plot_heatmap_font_color

The font color of the heatmap.

TYPE: Union[str, None]

plot_heatmap_font_style

The font style of the heatmap.

TYPE: Union[FONT_STYLE, str, None]

plot_heatmap_font_weight

The font weight of the heatmap.

TYPE: Union[FONT_WEIGHT, str, None]