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