vuecore.engines.plotly.histogram module

Contents

vuecore.engines.plotly.histogram module#

vuecore.engines.plotly.histogram.build(data: DataFrame, config: HistogramConfig) Figure[source]#

Creates a Plotly histogram figure from a DataFrame and a Pydantic configuration.

This function acts as a bridge between the abstract plot definition and the Plotly Express implementation. It translates the validated HistogramConfig into the arguments for plotly.express.histogram and also forwards any additional, unvalidated keyword arguments from Plotly. The resulting figure is then customized with layout and theme settings using plotly.graph_objects. (https://plotly.com/python-api-reference/generated/plotly.express.histogram.html).

Parameters:
  • data (pd.DataFrame) – The DataFrame containing the plot data.

  • config (HistogramConfig) – The validated Pydantic model with all plot configurations.

Returns:

A plotly.graph_objects.Figure object representing the histogram.

Return type:

go.Figure