示例#1
0
        public void DrawCommittedFilesPerDayPerActionChart()
        {
            RevisionControlHistoryData data = LoadHistoryFromFile();

            FluentChart chart = FluentChart.Create("Committed Files History", null, "commited files per day")
                                .SetBarSettings(BarType.Stack, 0)
                                .UseDateAsAxisY(data.MinTime.Date, data.MaxTime.Date);

            string[] colors = { "blue", "red", "green", "yellow", "orange", "brown" };

            IDictionary <RevisionControlHistoryEntryAction, SortedList <DateTime, double> > reportData
                = RevisionControlHistoryDataMiner.FetchCommittedFilesPerActionTypePerDay(data);

            int i = 0;

            foreach (RevisionControlHistoryEntryAction action in reportData.Keys)
            {
                chart
                .AddBarSeries(action.ToString(), colors[i++])
                .AddDataByDate(reportData[action], data.MinTime.Date, data.MaxTime.Date);
            }

            chart
            .ExportToBitmap("test.png", ImageFormat.Png, 2000, 800);
        }
        private string DrawCommitsPerDayPerAuthorChart(RevisionControlHistoryData history)
        {
            FluentChart chart = FluentChart.Create("Commits History", null, "commits per day")
                                .SetBarSettings(BarType.Stack, 0)
                                .UseDateAsAxisY(history.MinTime.Date, history.MaxTime.Date);

            string[] colors = { "blue", "red", "green", "yellow", "orange", "brown" };

            IDictionary <string, SortedList <DateTime, double> > commitsPerAuthorPerDay
                = RevisionControlHistoryDataMiner.FetchCommitsPerAuthorPerDay(history);

            int i = 0;

            foreach (string author in commitsPerAuthorPerDay.Keys)
            {
                chart
                .AddBarSeries(author, colors[i++])
                .AddDataByDate(commitsPerAuthorPerDay[author], history.MinTime.Date, history.MaxTime.Date);
            }

            string chartImageFileName = fileManager.GetProjectFullFileName(
                projectId,
                ModuleId,
                "CommitsPerDayPerAuthorChart.png",
                true);

            chart
            .ExportToBitmap(chartImageFileName, ImageFormat.Png, 2000, 800);

            return(chartImageFileName);
        }
示例#3
0
        public void DrawCommitsPerDayPerAuthorChart()
        {
            RevisionControlHistoryData data = LoadHistoryFromFile();

            FluentChart chart = FluentChart.Create("Commits History", null, "commits per day")
                                .SetBarSettings(BarType.Stack, 0)
                                .UseDateAsAxisY(data.MinTime.Date, data.MaxTime.Date);

            string[] colors = { "blue", "red", "green", "yellow", "orange", "brown" };

            IDictionary <string, SortedList <DateTime, double> > commitsPerAuthorPerDay
                = RevisionControlHistoryDataMiner.FetchCommitsPerAuthorPerDay(data);

            int i = 0;

            foreach (string author in commitsPerAuthorPerDay.Keys)
            {
                chart
                .AddBarSeries(author, colors[i++])
                .AddDataByDate(commitsPerAuthorPerDay[author], data.MinTime.Date, data.MaxTime.Date);
            }

            chart
            .ExportToBitmap("test.png", ImageFormat.Png, 2000, 800);
        }