vuecore.schemas.plotly_base module#
- class vuecore.schemas.plotly_base.PlotlyBaseConfig(*, x: str | None = None, y: str | None = None, color: str | None = None, hover_name: str | None = None, hover_data: List[str] = [], facet_row: str | None = None, facet_col: str | None = None, labels: Dict[str, str] | None = None, color_discrete_map: Dict[str, str] | None = None, category_orders: Dict[str, List[str]] | None = None, log_x: bool = False, log_y: bool = False, range_x: List[float] | None = None, range_y: List[float] | None = None, title: str = 'Plotly Plot', x_title: str | None = None, y_title: str | None = None, subtitle: str | None = None, template: str = 'plotly_white', width: int | None = 800, height: int | None = 600, **extra_data: Any)[source]#
Bases:
BaseModel
Pydantic model for common Plotly configurations.
This model serves as a curated API for common parameters of Plotly plots, closely aligned with the plotly.express API (https://plotly.com/python-api-reference/plotly.express.html).
This base class includes parameters shared across multiple plot types to ensure consistency and reduce code repetition. It uses a validator to enforce that at least one of the x or y axes is provided. Plot-specific schemas should inherit from this model.
- attribute labels: Dict[str, str] | None = None#
Dictionary to override column names for titles, legends, etc.
- attribute color_discrete_map: Dict[str, str] | None = None#
Specific color mappings for values in the color column.