<commit_before><commit_msg>Line graph added using d3.svg.line, both vertical and horizontal<commit_after>cv.linegraph = function (graphdef) {
	cv.graph.apply(this, [graphdef]);
	graphdef.stepup = false;
	graphdef.orientation = 'ver';
	this.init(graphdef);

	this.linegroups = [];
	this.dataset = r3.util.getDataArray(this.graphdef.dataset);

	var linegroup, linepath, linefunc,
		domainData = this.graphdef.dataset[0].data;

	this.axes[this.graphdef.orientation === 'hor'?'ver':'hor'].scale.domain(domainData.map(function(d){ return d.name;}));

	for(var idx=0, len=this.dataset.length; idx<len; idx++){
		linegroup = this.panel.append('g').attr('class','chart3rline');
		linepath = linegroup.append('g').attr('class','line_' + idx); linepath.datum(this.dataset[idx]);
		this['draw' + r3.util.getPascalCasedName(this.graphdef.orientation) + 'Lines'](linepath, idx);
		this.linegroups.push(linegroup);
	}

	this.finalize();
};

cv.linegraph.prototype = cv.extend(cv.graph);

cv.linegraph.prototype.drawHorLines = function (linepath, idx) {
	var axes = this.axes;

	var line = d3.svg.line()
				.x(function(d) { return axes.hor.scale(d.value); })
				.y(function(d) { return axes.ver.scale(d.name) + axes.ver.scale.rangeBand()/2; })
				.interpolate("linear");

	var path = linepath.append("svg:path")
				.attr("class", "linepath_" + idx)
				.attr("d", line);

	linepath.selectAll(".dot")
				.data(this.dataset[idx])
				.enter()
				.append("circle")
				.attr("class", "dot")
				.attr("cx", line.x())
				.attr("cy", line.y())
				.attr("r", 3.5).style("fill","white");
};

cv.linegraph.prototype.drawVerLines = function (linepath, idx) {
	var axes = this.axes, height = this.dimension.height;

	var line = d3.svg.line()
				.x(function(d) { return axes.hor.scale(d.name) + axes.hor.scale.rangeBand()/2; })
				.y(function(d) { return axes.ver.scale(d.value); })
				.interpolate("linear");

	var path = linepath.append("svg:path")
				.attr("class", "linepath_" + idx)
				.attr("d", line);

	linepath.selectAll(".dot")
				.data(this.dataset[idx])
				.enter()
				.append("circle")
				.attr("class", "dot")
				.attr("cx", line.x())
				.attr("cy", line.y())
				.attr("r", 3.5).style("fill","white");
};
{'fraction_non_alphanumeric': 0.21066907775768534, 'fraction_numerical': 0.006329113924050633, 'mean_word_length': 4.182669789227166, 'pattern_counts': {'":': 0, '<': 4, '<?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': '4372677', 'n_tokens_mistral': 912, 'n_tokens_neox': 804, 'n_words': 128}