diff --git a/vizro-ai/docs/pages/user-guides/add-generated-chart-usecase.md b/vizro-ai/docs/pages/user-guides/add-generated-chart-usecase.md index 5cbbcec83..deb3e9559 100644 --- a/vizro-ai/docs/pages/user-guides/add-generated-chart-usecase.md +++ b/vizro-ai/docs/pages/user-guides/add-generated-chart-usecase.md @@ -10,6 +10,7 @@ This guide explains the different ways in which you can add a chart generated by !!! example "Vizro-AI chart" === "Code for the cell" + ```python import vizro_ai from vizro_ai import VizroAI @@ -21,15 +22,18 @@ This guide explains the different ways in which you can add a chart generated by df = px.data.gapminder() vizro_ai = VizroAI(model="gpt-4o") - result = vizro_ai.plot(df, - """Plot a bubble chart to show the changes in life expectancy + result = vizro_ai.plot( + df, + """Plot a bubble chart to show the changes in life expectancy and GDP per capita for each country over time. Color the bubbles by continent. Add animation on yearly basis, and do not use facets. - Put the legend on top""", return_elements=True) + Put the legend on top""", + return_elements=True, + ) - print(f"Insight:\n{result.chart_insights}\n" ) - print(f"Code explanation:\n{result.code_explanation}\n\nCode:\n{result.code_vizro}\n" ) + print(f"Insight:\n{result.chart_insights}\n") + print(f"Code explanation:\n{result.code_explanation}\n\nCode:\n{result.code_vizro}\n") result.get_fig_object(df).show() ```