Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Move vertical legend to the right (for cartesian charts) (#62270)

Anton Kulykf2998927927c
diff --git a/frontend/src/metabase/visualizations/components/legend/LegendLayout.jsx b/frontend/src/metabase/visualizations/components/legend/LegendLayout.jsx
index 325a2000ad7..e18fb855708 100644
--- a/frontend/src/metabase/visualizations/components/legend/LegendLayout.jsx
+++ b/frontend/src/metabase/visualizations/components/legend/LegendLayout.jsx
@@ -61,6 +61,12 @@ export const LegendLayout = ({
return (
<LegendLayoutRoot className={className} isVertical={isVertical}>
+ <MainContainer>
+ {isVertical && actionButtons && (
+ <LegendActions>{actionButtons}</LegendActions>
+ )}
+ {hasDimensions && <ChartContainer>{children}</ChartContainer>}
+ </MainContainer>
{isVisible && (
<LegendContainer
isVertical={isVertical}
@@ -81,12 +87,6 @@ export const LegendLayout = ({
)}
</LegendContainer>
)}
- <MainContainer>
- {isVertical && actionButtons && (
- <LegendActions>{actionButtons}</LegendActions>
- )}
- {hasDimensions && <ChartContainer>{children}</ChartContainer>}
- </MainContainer>
</LegendLayoutRoot>
);
};