<commit_before>var interpolationLine = graphs.interpolationLine()
		.parent(d3.select('#interpolationLine').node())
		.ease('cubic-in-out')
		.draw();

var tweenCandleBar = graphs.candleBar()
		.parent(d3.select('#tweenCandleBar').node())
		.draw();


var naiveCandleBar = graphs.candleBar()
		.parent(d3.select('#naiveCandleBar').node())
		.draw();


var dispatchingGraphs = [interpolationLine];
var listeningGraphs = dispatchingGraphs.slice().concat([tweenCandleBar, naiveCandleBar]);

dispatchingGraphs.forEach(function(graph){
	graph.on('mouseT', updateHover);
})


function updateExtent(extent){
	var yScale = tweenCandleBar.yScale();
	yScale.domain(extent);

	var i = d3.interpolate(extent[0], extent[1]);
	tweenCandleBar
			.extent(extent)
			.heightF(compose(valToHeight, i))
			.yF(compose(valToY, i))

	var i = d3.interpolate(extent[0], extent[1]);
	naiveCandleBar
			.extent(extent)
			.heightF(function(t){
				return yScale(0) - yScale(Math.abs(i(t)));
			})
			.yF(function(t){
				return yScale(i(t) > 0 ? i(t) : 0)
			})

	function valToHeight(d){ return yScale(0) - yScale(Math.abs(d)); }
	function valToY(d){ return yScale(d) > 0 ? d : 0; }


}
updateExtent([-15, 10])



function updateHover(t){
	listeningGraphs.forEach(function(graph){
		graph.mouse(t);
	})
}
updateHover(0);<commit_msg>naive tranistion example bar working<commit_after>var interpolationLine = graphs.interpolationLine()
		.parent(d3.select('#interpolationLine').node())
		.ease('cubic-in-out')
		.draw();

var tweenCandleBar = graphs.candleBar()
		.parent(d3.select('#tweenCandleBar').node())
		.draw();


var naiveCandleBar = graphs.candleBar()
		.parent(d3.select('#naiveCandleBar').node())
		.draw();


var dispatchingGraphs = [interpolationLine];
var listeningGraphs = dispatchingGraphs.slice().concat([tweenCandleBar, naiveCandleBar]);

dispatchingGraphs.forEach(function(graph){
	graph.on('mouseT', updateHover);
})


function updateExtent(extent){
	var yScale = tweenCandleBar.yScale();
	yScale.domain(extent);

	var i = d3.interpolate(extent[0], extent[1]);
	tweenCandleBar
			.extent(extent)
			.heightF(compose(valToHeight, i))
			.yF(compose(valToY, i))

	var hExtent = extent.map(valToHeight)
	var yExtent = extent.map(valToY)
	naiveCandleBar
			.extent(extent)
			.heightF(d3.interpolate(hExtent[0], hExtent[1]))
			.yF(d3.interpolate(yExtent[0], yExtent[1]))

	function valToHeight(d){ return yScale(0) - yScale(Math.abs(d)); }
	function valToY(d){ return yScale(d > 0 ? d : 0); }


}
updateExtent([-15, 10])



function updateHover(t){
	listeningGraphs.forEach(function(graph){
		graph.mouse(t);
	})
}
updateHover(0);
{'fraction_non_alphanumeric': 0.170927127050744, 'fraction_numerical': 0.015261350629530714, 'mean_word_length': 5.364077669902913, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '6982186', 'n_tokens_mistral': 1117, 'n_tokens_neox': 1017, 'n_words': 153}