diff --git a/openbb_platform/obbject_extensions/charting/openbb_charting/charts/generic_charts.py b/openbb_platform/obbject_extensions/charting/openbb_charting/charts/generic_charts.py
index e79033f7108..b87f0ecf4a1 100644
--- a/openbb_platform/obbject_extensions/charting/openbb_charting/charts/generic_charts.py
+++ b/openbb_platform/obbject_extensions/charting/openbb_charting/charts/generic_charts.py
@@ -426,7 +426,8 @@ def bar_chart( # noqa: PLR0912
bar_df = data.copy().set_index(x) # type: ignore
y = y.split(",") if isinstance(y, str) else y
-
+ hovertemplate = bar_kwargs.pop("hovertemplate", None)
+ width = bar_kwargs.pop("width", None)
for item in y:
figure.add_bar(
x=bar_df.index if orientation == "v" else bar_df[item],
@@ -436,11 +437,19 @@ def bar_chart( # noqa: PLR0912
legendgroup=bar_df[item].name,
orientation=orientation,
hovertemplate=(
- "%{fullData.name}:%{y}"
- if orientation == "v"
- else "%{fullData.name}:%{x}"
+ hovertemplate
+ if hovertemplate
+ else (
+ "%{fullData.name}:%{y}"
+ if orientation == "v"
+ else "%{fullData.name}:%{x}"
+ )
+ ),
+ width=(
+ width
+ if width
+ else 0.95 / len(y) * 0.75 if barmode == "group" and len(y) > 1 else 0.95
),
- width=0.95 / len(y) * 0.75 if barmode == "group" and len(y) > 1 else 0.95,
**bar_kwargs,
)
diff --git a/openbb_platform/obbject_extensions/charting/openbb_charting/core/openbb_figure.py b/openbb_platform/obbject_extensions/charting/openbb_charting/core/openbb_figure.py
index 9e8c267f9f8..dcded09e648 100644
--- a/openbb_platform/obbject_extensions/charting/openbb_charting/core/openbb_figure.py
+++ b/openbb_platform/obbject_extensions/charting/openbb_charting/core/openbb_figure.py
@@ -925,19 +925,6 @@ class OpenBBFigure(go.Figure):
if data.get("layout", {}):
pio.show(data, *args, **kwargs)
- self.update_layout(
- legend=dict(
- orientation=(
- "v"
- if not self.layout.legend.orientation
- else self.layout.legend.orientation
- ),
- ),
- barmode="overlay",
- bargap=0,
- bargroupgap=0,
- )
-
return pio.show(self, *args, **kwargs)
def _xaxis_tickformatstops(self) -> None: