Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2014
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. //
  2. // GET: /AppUser/Details/5 - returns all App Users
  3. // [Route("users/")]
  4. public ActionResult Chart()
  5. {
  6. //This is were and getting the data from database, Please how can I break It down?
  7. var users = _appUserService.GetAllUsers().Where(x => x.SignupDate == DateTime.Now);
  8.  
  9. DotNet.Highcharts.Highcharts chart = new DotNet.Highcharts.Highcharts("chart")
  10. .SetXAxis(new XAxis
  11. {
  12. Categories = new[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16",
  13. "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }
  14. })
  15. .InitChart(new Chart { DefaultSeriesType = ChartTypes.Line })
  16. .SetTitle(new Title { Text = "User Registration per Day" })
  17. .SetSubtitle(new Subtitle { Text = "Total Count" })
  18. .SetYAxis(new YAxis { Title = new YAxisTitle { Text = "Approximate Count" } })
  19. .SetSeries(new Series
  20. {
  21. Name = "Monthly Days",
  22. Data = new Data(new object[] { 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0 })
  23. });
  24.  
  25. return View(chart);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement