class TrendRepositoryImpl implements TrendRepository, Constants {

    @Override
    public List<Map<String, Object>> getComplianceTrendProgress(
            String assetGroup, LocalDate fromDate, String domain,
            Set<String> ruleCat) throws DataException {
        List<String> categoryList = new ArrayList<>(ruleCat);
        Map<String, Object> mustFilter = new HashMap<>();
        mustFilter.put(CommonUtils.convertAttributetoKeyword("ag"), assetGroup);
        mustFilter.put(CommonUtils.convertAttributetoKeyword(DOMAIN), domain);
        Map<String, Object> rangeMap = new HashMap<>();
        rangeMap.put("gte", fromDate.format(DateTimeFormatter.ISO_DATE));

        Map<String, Object> dateRangeMap = new HashMap<>();
        dateRangeMap.put("date", rangeMap);

        mustFilter.put(RANGE, dateRangeMap);
        categoryList.add("date");
        categoryList.add("overall");
try{
        return elasticSearchRepository.getSortedDataFromES(AG_STATS, "compliance",
                mustFilter, null, null, categoryList, null,null);
}catch(Exception e){
    throw new DataException(e);
}
    }

}