From 651a9a3c05201fe4dd0577dccff1ee3d6225fb95 Mon Sep 17 00:00:00 2001 From: Flavien David Date: Thu, 31 Oct 2024 19:39:48 +0100 Subject: [PATCH] Improve visualization prompt to better support screenshot (#8397) * Improve visualization prompt to better support screenshot * :scissors: --- front/lib/api/assistant/visualization.ts | 6 ++++-- viz/app/components/VisualizationWrapper.tsx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/front/lib/api/assistant/visualization.ts b/front/lib/api/assistant/visualization.ts index 2e65e1fa9f4b..aa0e9c3a32a6 100644 --- a/front/lib/api/assistant/visualization.ts +++ b/front/lib/api/assistant/visualization.ts @@ -136,8 +136,10 @@ Guidelines using the :::visualization tag: - Props: - The generated component should not have any required props / parameters - Responsiveness: - - The content should be responsive - - The outermost container should have a fixed height between 200 and 600 pixels, set using the \`style\` prop such as \`
\` + - Use ResponsiveContainer for charts to adapt to parent dimensions + - Leave adequate padding around charts for labels and legends + - Content should adapt gracefully to different widths + - For multi-chart layouts, use flex or grid to maintain spacing - The component should be able to adapt to different screen sizes - The content should never overflow the viewport and should never have horizontal or vertical scrollbars - Styling: diff --git a/viz/app/components/VisualizationWrapper.tsx b/viz/app/components/VisualizationWrapper.tsx index f098f38cbfcb..51d06a5656d7 100644 --- a/viz/app/components/VisualizationWrapper.tsx +++ b/viz/app/components/VisualizationWrapper.tsx @@ -251,7 +251,7 @@ export function VisualizationWrapper({