diff --git a/libs/sdk-ui-gen-ai/src/components/messages/contents/VisualizationContents.tsx b/libs/sdk-ui-gen-ai/src/components/messages/contents/VisualizationContents.tsx index 1207c2c8206..f3a15c76365 100644 --- a/libs/sdk-ui-gen-ai/src/components/messages/contents/VisualizationContents.tsx +++ b/libs/sdk-ui-gen-ai/src/components/messages/contents/VisualizationContents.tsx @@ -53,7 +53,7 @@ export const VisualizationContentsComponent: React.FC -
+
{visualization.title} @@ -77,6 +77,9 @@ const renderBarChart = (metrics: IMeasure[], dimensions: IAttribute[], filters: config={{ // Better visibility with stacked bars if there are multiple metrics and dimensions stackMeasures: metrics.length > 1 && dimensions.length === 2, + legend: { + responsive: "autoPositionWithPopup", + }, }} filters={filters} /> @@ -91,6 +94,9 @@ const renderColumnChart = (metrics: IMeasure[], dimensions: IAttribute[], filter config={{ // Better visibility with stacked bars if there are multiple metrics and dimensions stackMeasures: metrics.length > 1 && dimensions.length === 2, + legend: { + responsive: "autoPositionWithPopup", + }, }} filters={filters} /> @@ -103,6 +109,11 @@ const renderLineChart = (metrics: IMeasure[], dimensions: IAttribute[], filters: trendBy={dimensions[0]} segmentBy={metrics.length <= 1 ? dimensions[1] : undefined} filters={filters} + config={{ + legend: { + responsive: "autoPositionWithPopup", + }, + }} /> ); diff --git a/libs/sdk-ui-gen-ai/styles/scss/messages.scss b/libs/sdk-ui-gen-ai/styles/scss/messages.scss index 79e060f0be5..1a4a677798c 100644 --- a/libs/sdk-ui-gen-ai/styles/scss/messages.scss +++ b/libs/sdk-ui-gen-ai/styles/scss/messages.scss @@ -185,6 +185,7 @@ &__title { text-align: center; + margin-top: 15px; } }