Exemple #1
0
        public ActionResult VotesPerDate()
        {
            var votesPerDate    = dataProvider.GetVotesPerDate();
            var votesPerDayData = chartDataConverter.ToChartData(votesPerDate, v => v.Date.GetJavascriptTimestamp());

            var cumulativeVotesPerDayData = WorkOutCumulativeVotes(votesPerDate);

            var viewModel = new VotesPerDateViewModel {
                DayByDay = votesPerDayData, Cumulative = cumulativeVotesPerDayData
            };

            return(View(viewModel));
        }
Exemple #2
0
 public ChartDataConverterBuilder WithChartDataPerHour(long[][] chartData)
 {
     chartDataConverter.ToChartData(Arg.Any <IList <DateTimeVoteModel> >(), Arg.Any <Func <DateTimeVoteModel, long> >()).Returns(chartData);
     return(this);
 }