<commit_before>﻿func.drawGantt = function () {
    var $svg = $('#Gantt');
    if ($svg.length !== 1) {
        return;
    }
    $svg.empty();
    var json = JSON.parse($('#GanttJson').val());
    if (json.length === 0) {
        $svg.hide();
        return;
    }
    $svg.show();
    var justTime = new Date();
    var svg = d3.select('#Gantt');
    var padding = 20;
    var axisPadding = 50;
    var width = parseInt(svg.style('width'));
    var height = parseInt(svg.style('height'));
    var bodyWidth = width - padding * 2;
    var minDate = new Date(d3.min(json, function (d) {
        return Math.min.apply(null, [new Date(d.StartTime), justTime]);
    }));
    var maxDate = new Date(d3.max(json, function (d) {
        return Math.max.apply(null, [new Date(d.CompletionTime), justTime]);
    }));
    var dayWidth = (bodyWidth - padding) / dateDiff('d', maxDate, minDate);
    var xScale = d3.time.scale()
        .domain([minDate, maxDate])
        .range([padding, bodyWidth]);
    var xHarf = xScale(maxDate) / 2;
    var xAxis = d3.svg.axis()
        .scale(xScale)
        .tickFormat(d3.time.format('%m/%d'))
        .ticks(20);
    var now = padding + xScale(justTime);
    d3.select('#GanttAxis').append('g')
        .attr('class', 'axis')
        .attr('transform', 'translate(30, 10)')
        .call(xAxis)
        .selectAll('text')
        .attr('x', -20)
        .attr('y', 20)
        .style('text-anchor', 'start');
    var groupCount = json.filter(function (d) { return d.GroupSummary }).length === 0
        ? 0
        : -1;
    $.each(json, function (i, d) {
        if (d.GroupSummary) groupCount++;
        d.Y = padding + i * 25 + groupCount * 25;
    });
    $('#Gantt').css('height', d3.max(json, function (d) { return d.Y }) + 60);<commit_msg>Refactored: 使用していない変数を削除。<commit_after>﻿func.drawGantt = function () {
    var $svg = $('#Gantt');
    if ($svg.length !== 1) {
        return;
    }
    $svg.empty();
    var json = JSON.parse($('#GanttJson').val());
    if (json.length === 0) {
        $svg.hide();
        return;
    }
    $svg.show();
    var justTime = new Date();
    var svg = d3.select('#Gantt');
    var padding = 20;
    var axisPadding = 50;
    var width = parseInt(svg.style('width'));
    var height = parseInt(svg.style('height'));
    var bodyWidth = width - padding * 2;
    var minDate = new Date(d3.min(json, function (d) {
        return Math.min.apply(null, [new Date(d.StartTime), justTime]);
    }));
    var maxDate = new Date(d3.max(json, function (d) {
        return Math.max.apply(null, [new Date(d.CompletionTime), justTime]);
    }));
    var xScale = d3.time.scale()
        .domain([minDate, maxDate])
        .range([padding, bodyWidth]);
    var xHarf = xScale(maxDate) / 2;
    var xAxis = d3.svg.axis()
        .scale(xScale)
        .tickFormat(d3.time.format('%m/%d'))
        .ticks(20);
    var now = padding + xScale(justTime);
    d3.select('#GanttAxis').append('g')
        .attr('class', 'axis')
        .attr('transform', 'translate(30, 10)')
        .call(xAxis)
        .selectAll('text')
        .attr('x', -20)
        .attr('y', 20)
        .style('text-anchor', 'start');
    var groupCount = json.filter(function (d) { return d.GroupSummary }).length === 0
        ? 0
        : -1;
    $.each(json, function (i, d) {
        if (d.GroupSummary) groupCount++;
        d.Y = padding + i * 25 + groupCount * 25;
    });
    $('#Gantt').css('height', d3.max(json, function (d) { return d.Y }) + 60);
{'fraction_non_alphanumeric': 0.19221967963386727, 'fraction_numerical': 0.02002288329519451, 'mean_word_length': 2.3689788053949905, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1988592', 'n_tokens_mistral': 1256, 'n_tokens_neox': 1217, 'n_words': 267}