C# 根据天、周、月汇总统计生成统计报表

2021-03-10 01:26

阅读:392

   public static class DynamicQueryable
    {        public static IQueryable> GroupBy        
             (IQueryable query, Expression> keySelector)
        {
              return query.GroupBy(keySelector);
        }
      
    

public static ObservableCollection ToObservableCollection(this IEnumerable col)
{
return new ObservableCollection(col);
}


}

public static class DateTimeExtension
{
public static int GetWeekOfYear(this DateTime dt)
{
GregorianCalendar calendar = new GregorianCalendar();
return calendar.GetWeekOfYear(dt, CalendarWeekRule.FirstDay, DayOfWeek.Monday);//注意这里一周是以星期一为第一天
}
}


前端图表显示使用插件:echarts 官网为:https://www.echartsjs.com/zh/index.html


评论


亲,登录后才可以留言!