<commit_before>r3.effects = {};

r3.effects.bar = {};
r3.effects.bar.mouseover = function (config) {
	return function () {
		d3.select(this.parentNode.parentNode).selectAll('rect')
			.style('fill', config.effects.hovercolor)
			.style('stroke', config.effects.strokecolor);
	
		d3.select(this.parentNode.parentNode).selectAll('text')
			.style('fill', config.effects.textcolor);
	}
};

r3.effects.bar.mouseout = function (config, color) {
	return function () {
		d3.select(this.parentNode.parentNode).selectAll('rect')
			.style('fill', color)
			.style('stroke', 'none');
	
		d3.select(this.parentNode.parentNode).selectAll('text')
			.style('fill', 'none');
	}
};

r3.effects.line = {};
r3.effects.line.mouseover = function (config) {
	return function () {
		d3.select(this.parentNode).selectAll('circle').style('fill', config.effects.hovercolor);
		d3.select(this.parentNode).selectAll('circle').style('stroke', config.effects.hovercolor);
		d3.select(this.parentNode).select('path').style('stroke', config.effects.hovercolor);
		d3.select(this.parentNode).selectAll('text').style('fill', config.effects.textcolor);
	};
};

r3.effects.line.mouseout = function (config, color) {
	return function () {
		d3.select(this.parentNode).selectAll('circle').style('fill', 'none');
		d3.select(this.parentNode).selectAll('circle').style('stroke', color);
		d3.select(this.parentNode).select('path').style('stroke', color);
		d3.select(this.parentNode).selectAll('text').style('fill', 'none');
	};
};

r3.effects.caption = {};
r3.effects.caption.mouseover = function (config) {
	return function () {
		d3.select(this.parentNode.parentNode).select('.' + r3.constants.name.background).style('fill', config.caption.hovercolor);
	};
};

r3.effects.caption.mouseout = function (config) {
	return function () {
		d3.select(this.parentNode.parentNode).select('.' + r3.constants.name.background).style('fill', config.graph.background);
	};
};

r3.effects.donut = {};
r3.effects.donut.mouseover = function (center, arcfunc, config, d) {
	return function (d) {
		var dev = {
				x : arcfunc.centroid(d)[0] / 5,
				y : arcfunc.centroid(d)[1] / 5
			};

		d3.select(this.parentNode).transition()
			.duration(config.effects.duration)
			.attr('transform', 'translate(' + (center.x + dev.x) + ',' + (center.y + dev.y) + ')');
	};
};

r3.effects.donut.mouseout = function (center, config) {
	return function () {
		d3.select(this.parentNode).transition()
			.duration(config.effects.duration)
			.attr('transform', 'translate(' + center.x + ',' + center.y + ')');
	};
};

r3.effects.pie = {};
r3.effects.pie.mouseover = function (center, arcfunc, config, d) {
	return function (d) {
		var dev = {
				x : arcfunc.centroid(d)[0] / 5,
				y : arcfunc.centroid(d)[1] / 5
			};

		d3.select(this.parentNode).transition()
			.duration(config.effects.duration)
			.attr('transform', 'translate(' + (center.x + dev.x) + ',' + (center.y + dev.y) + ')');
	};
};

r3.effects.pie.mouseout = function (center, config) {
	return function () {
		d3.select(this.parentNode).transition()
			.duration(config.effects.duration)
			.attr('transform', 'translate(' + center.x + ',' + center.y + ')');
	};
};
<commit_msg>Effects for area charts and transition time for all effects added<commit_after>r3.effects = {};

r3.effects.bar = {};
r3.effects.bar.mouseover = function (config) {
	return function () {
		d3.select(this.parentNode.parentNode).selectAll('rect')
			.transition().duration(config.effects.hover)
				.style('fill', config.effects.hovercolor)
				.style('stroke', config.effects.strokecolor);
	
		d3.select(this.parentNode.parentNode).selectAll('text')
			.transition().duration(config.effects.hover)
				.style('fill', config.effects.textcolor)
				.style('opacity', 1);
	}
};

r3.effects.bar.mouseout = function (config, color) {
	return function () {
		d3.select(this.parentNode.parentNode).selectAll('rect')
			.transition().duration(config.effects.hover)
				.style('fill', color)
				.style('stroke', 'none');
	
		d3.select(this.parentNode.parentNode).selectAll('text')
			.transition().duration(config.effects.hover)
				.style('fill', 'none');
	}
};

r3.effects.area = {};
r3.effects.area.mouseover = function (config) {
	return function () {
		d3.select(this)
			.transition().duration(config.effects.hover)
				.style('fill', config.effects.hovercolor);
	};
};

r3.effects.area.mouseout = function (config) {
	return function (d, i) {
		d3.select(this)
			.transition().duration(config.effects.hover)
				.style('fill', r3.util.getColorBand(config, i)); 
	};
};

r3.effects.line = {};
r3.effects.line.mouseover = function (config) {
	return function () {
		d3.select(this.parentNode).selectAll('circle')
			.transition().duration(config.effects.hover)
				.style('fill', config.effects.hovercolor)
				.style('stroke', config.effects.hovercolor);
				
		d3.select(this.parentNode).select('path')
			.transition().duration(config.effects.hover)
				.style('stroke', config.effects.hovercolor);
				
		d3.select(this.parentNode).selectAll('text')
			.transition().duration(config.effects.hover)
				.style('fill', config.effects.textcolor);
	};
};

r3.effects.line.mouseout = function (config, color) {
	return function () {
		d3.select(this.parentNode).selectAll('circle')
			.transition().duration(config.effects.hover)
				.style('fill', 'none')
				.style('stroke', color);
				
		d3.select(this.parentNode).select('path')
			.transition().duration(config.effects.hover)
				.style('stroke', color);
				
		d3.select(this.parentNode).selectAll('text')
			.transition().duration(config.effects.hover)
				.style('fill', 'none');
	};
};

r3.effects.caption = {};
r3.effects.caption.mouseover = function (config) {
	return function () {
		d3.select(this.parentNode.parentNode).select('.' + r3.constants.name.background)
			.transition().duration(config.effects.duration)
				.style('fill', config.caption.hovercolor);
	};
};

r3.effects.caption.mouseout = function (config) {
	return function () {
		d3.select(this.parentNode.parentNode).select('.' + r3.constants.name.background)
			.transition().duration(config.effects.duration)
				.style('fill', config.graph.background);
	};
};

r3.effects.donut = {};
r3.effects.donut.mouseover = function (center, arcfunc, config, d) {
	return function (d) {
		var dev = {
				x : arcfunc.centroid(d)[0] / 5,
				y : arcfunc.centroid(d)[1] / 5
			};

		d3.select(this.parentNode)
			.transition().duration(config.effects.duration)
				.attr('transform', 'translate(' + (center.x + dev.x) + ',' + (center.y + dev.y) + ')');
	};
};

r3.effects.donut.mouseout = function (center, config) {
	return function () {
		d3.select(this.parentNode)
			.transition().duration(config.effects.duration)
				.attr('transform', 'translate(' + center.x + ',' + center.y + ')');
	};
};

r3.effects.pie = {};
r3.effects.pie.mouseover = function (center, arcfunc, config, d) {
	return function (d) {
		var dev = {
				x : arcfunc.centroid(d)[0] / 5,
				y : arcfunc.centroid(d)[1] / 5
			};

		d3.select(this.parentNode)
			.transition().duration(config.effects.duration)
				.attr('transform', 'translate(' + (center.x + dev.x) + ',' + (center.y + dev.y) + ')');
	};
};

r3.effects.pie.mouseout = function (center, config) {
	return function () {
		d3.select(this.parentNode)
			.transition().duration(config.effects.duration)
				.attr('transform', 'translate(' + center.x + ',' + center.y + ')');
	};
};

{'fraction_non_alphanumeric': 0.19803048698232834, 'fraction_numerical': 0.01254552812626467, 'mean_word_length': 4.177374301675978, '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': '6676528', 'n_tokens_mistral': 2798, 'n_tokens_neox': 2540, 'n_words': 354}