diff --git a/vizro-core/examples/visual-vocabulary/custom_charts.py b/vizro-core/examples/visual-vocabulary/custom_charts.py index 0763748a8..a875b2dfc 100644 --- a/vizro-core/examples/visual-vocabulary/custom_charts.py +++ b/vizro-core/examples/visual-vocabulary/custom_charts.py @@ -259,7 +259,7 @@ def diverging_stacked_bar( ordered from least to most positive. category_neg (List[str]): List of column names in the DataFrame representing negative values. Columns should be ordered from least to most negative. - color_discrete_map: Optional[Dict[str, str]]: A dictionary mapping category names to color strings. + color_discrete_map: Optional[dict[str, str]]: A dictionary mapping category names to color strings. Returns: go.Figure: A Plotly Figure object representing the horizontal diverging stacked bar chart. diff --git a/vizro-core/examples/visual-vocabulary/pages/examples/diverging_stacked_bar.py b/vizro-core/examples/visual-vocabulary/pages/examples/diverging_stacked_bar.py index 2ecf70b9f..363aecb45 100644 --- a/vizro-core/examples/visual-vocabulary/pages/examples/diverging_stacked_bar.py +++ b/vizro-core/examples/visual-vocabulary/pages/examples/diverging_stacked_bar.py @@ -1,4 +1,4 @@ -from typing import Dict, List, Optional +from typing import Optional import pandas as pd import plotly.graph_objects as go @@ -37,7 +37,7 @@ def diverging_stacked_bar( y: str, category_pos: List[str], category_neg: List[str], - color_discrete_map: Optional[Dict[str, str]] = None, + color_discrete_map: Optional[dict[str, str]] = None, ) -> go.Figure: """Creates a horizontal diverging stacked bar chart (with positive and negative values only) using Plotly's go.Bar. @@ -55,7 +55,7 @@ def diverging_stacked_bar( ordered from least to most positive. category_neg (List[str]): List of column names in the DataFrame representing negative values. Columns should be ordered from least to most negative. - color_discrete_map: Optional[Dict[str, str]]: A dictionary mapping category names to color strings. + color_discrete_map: Optional[dict[str, str]]: A dictionary mapping category names to color strings. Returns: go.Figure: A Plotly Figure object representing the horizontal diverging stacked bar chart.