class window.ContributorsStatGraph init: (log) -> @parsed_log = ContributorsStatGraphUtil.parse_log(log) @set_current_field("commits") total_commits = ContributorsStatGraphUtil.get_total_data(@parsed_log, @field) author_commits = ContributorsStatGraphUtil.get_author_data(@parsed_log, @field) @add_master_graph(total_commits) @add_authors_graph(author_commits) @change_date_header() add_master_graph: (total_data) -> @master_graph = new ContributorsMasterGraph(total_data) @master_graph.draw() add_authors_graph: (author_data) -> @authors = [] limited_author_data = author_data.slice(0, 100) _.each(limited_author_data, (d) => author_header = @create_author_header(d) $(".contributors-list").append(author_header) @authors[d.author] = author_graph = new ContributorsAuthorGraph(d.dates) author_graph.draw() ) format_author_commit_info: (author) -> commits = $('', { class: 'graph-author-commits-count' }) commits.text(author.commits + " commits") additions = $('', { class: 'graph-additions' }) additions.text(author.additions + " ++") deletions = $('', { class: 'graph-deletions' }) deletions.text(author.deletions + " --") $('').append(commits) .append(" / ") .append(additions) .append(" / ") .append(deletions) create_author_header: (author) -> list_item = $('
', { class: 'person' style: 'display: block;' }) author_name = $('