Class ChartRenderer
java.lang.Object
com.vaadin.flow.component.ai.chart.ChartRenderer
- All Implemented Interfaces:
Serializable
Stateless utility for rendering chart data from SQL queries. Encapsulates the
query-execution-to-drawChart pipeline so that different controllers
(standalone chart, dashboard) share the same rendering logic.
- Author:
- Vaadin Ltd
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidrenderChart(Chart chart, DatabaseProvider databaseProvider, DataConverter dataConverter, List<String> queries, String configJson) Renders a chart by executing queries, converting results to series, and applying configuration.
-
Method Details
-
renderChart
public static void renderChart(Chart chart, DatabaseProvider databaseProvider, DataConverter dataConverter, List<String> queries, String configJson) Renders a chart by executing queries, converting results to series, and applying configuration.- Parameters:
chart- the chart to render, notnulldatabaseProvider- the database provider for query execution, notnulldataConverter- the data converter for transforming query results, notnullqueries- the SQL queries to execute (one per series), notnullconfigJson- the chart configuration JSON, ornullto keep current
-