Docs

Documentation versions (currently viewingVaadin 25.4 (pre-release))

AI-Powered Chart Flow

Let users build and update charts from your application database using natural language.

AI-Powered Chart lets your users build and update Vaadin Charts visualizations by typing in natural language. The ChartAiController from the AI Support module wires an AiOrchestrator to a Chart and a QueryExecutor, so an LLM can inspect the database schema, write SQL queries, and update the Highcharts configuration on the fly.

Note
Commercial Feature

A commercial Vaadin subscription is required to use AI-Powered Chart in your project.

Source code
Java
Chart chart = new Chart();
MessageInput messageInput = new MessageInput();

QueryExecutor queryExecutor = new JdbcQueryExecutor(dataSource);
ChartAiController controller = new ChartAiController(chart, queryExecutor);

AiOrchestrator.builder(provider, systemPrompt)
        .withInput(messageInput)
        .withController(controller)
        .build();

add(messageInput, chart);

Example prompts:

  • "Plot monthly revenue for the last year as a column chart."

  • "Show revenue by region as a pie chart."

  • "Compare 2025 and 2026 quarterly sales side-by-side with a legend."

For the full guide — including state persistence, custom data conversion, and combining several charts with the Dashboard component — see AI-Powered Chart in the AI Support section. The same approach is available for tabular data via AI-Powered Grid.