use of com.vaadin.ui.AbstractOrderedLayout in project cia by Hack23.
the class PersonDocumentChartDataManagerImpl method createPersonDocumentHistoryChart.
@Override
public void createPersonDocumentHistoryChart(final AbstractOrderedLayout content, final String personId) {
final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DD_MMM_YYYY, Locale.ENGLISH);
final DataSeries dataSeries = new DataSeries();
final Series series = new Series();
final Map<String, List<ViewRiksdagenPoliticianDocumentDailySummary>> allMap = getViewRiksdagenPoliticianDocumentDailySummaryMap();
final List<ViewRiksdagenPoliticianDocumentDailySummary> itemList = allMap.get(personId.toUpperCase(Locale.ENGLISH).replace(UNDER_SCORE, EMPTY_STRING).trim());
if (itemList != null) {
final Map<String, List<ViewRiksdagenPoliticianDocumentDailySummary>> map = itemList.parallelStream().filter(Objects::nonNull).collect(Collectors.groupingBy(t -> StringUtils.defaultIfBlank(t.getEmbeddedId().getDocumentType(), NO_INFO)));
addDocumentHistoryByPersonData(simpleDateFormat, dataSeries, series, map);
}
addChart(content, DOCUMENT_HISTORY, new DCharts().setDataSeries(dataSeries).setOptions(getChartOptions().createOptionsXYDateFloatLegendInsideOneColumn(series)).show(), true);
}
Aggregations