Interface DataConverter
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DefaultDataConverter
Converts tabular data into chart
Series for rendering. The input is a
list of rows, where each row is a column-name-to-value map.
Implementations may return one or more series depending on the data. The
DefaultDataConverter provides automatic chart type detection based on
column names and supports multi-series grouping via a series column.
Custom implementations can apply any conversion logic appropriate for their
use case.
- Since:
- 25.3
- Author:
- Vaadin Ltd
- See Also:
-
Method Summary
-
Method Details
-
convertToSeries
Converts tabular data into one or more chart series.Each element in the input list represents a single row, with column names as keys and column values as values.
May be called from a background thread, where Vaadin thread locals such as
UI.getCurrent()returnnull, and more than once per chart update. An implementation that depends on UI state, such as the locale for formatting labels, should capture that state when the converter is created rather than read thread locals here.- Parameters:
data- the tabular data to convert, notnull- Returns:
- a list of series ready for use in a chart, never
nulland never empty - Throws:
NullPointerException- if data isnull
-