use of com.hack23.cia.model.internal.application.data.impl.ViewApplicationActionEventPageModeDailySummary in project cia by Hack23.
the class AdminChartDataManagerImpl method createApplicationActionEventPageModeDailySummaryChart.
@Override
public void createApplicationActionEventPageModeDailySummaryChart(final AbstractOrderedLayout content, final String page) {
final Map<String, List<ViewApplicationActionEventPageModeDailySummary>> map = getApplicationActionEventPageModeDailySummaryMap(page);
final DataSeries dataSeries = new DataSeries();
final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DD_MMM_YYYY, Locale.ENGLISH);
final Series series = new Series();
for (final Entry<String, List<ViewApplicationActionEventPageModeDailySummary>> entry : map.entrySet()) {
if (entry.getKey() != null) {
series.addSeries(new XYseries().setLabel(entry.getKey()));
dataSeries.newSeries();
final List<ViewApplicationActionEventPageModeDailySummary> list = entry.getValue();
for (final ViewApplicationActionEventPageModeDailySummary item : list) {
if (item != null) {
dataSeries.add(simpleDateFormat.format(item.getEmbeddedId().getCreatedDate()), item.getHits());
}
}
}
}
addChart(content, "Page Action Events daily Summary", new DCharts().setDataSeries(dataSeries).setOptions(getChartOptions().createOptionsXYDateFloatLogYAxisLegendOutside(series)).show(), true);
}
Aggregations