<commit_before>/*!
 * OpenSpendings BubbleChart 0.1
 *
 * Copyright (c) 2011 <NAME> (http://driven-by-data.net)
 * Licensed under the MIT license
 */
/*jshint undef: true, browser:true, jquery: true, devel: true */
/*global Raphael, TWEEN */

var OpenSpendings = OpenSpendings ? OpenSpendings : {}; 

OpenSpendings.BubbleChart = function(container, urlOrTree) {
	this.container = container;
	this.urlOrTree = urlOrTree;
		
	$(document).ready(function() {
		var me = this;
		me.app = new OpenSpendings.BubbleChart.Main(this.container);
		if (typeof(me.urlOrTree) == "string") {
			me.app.loadData(me.urlOrTree);
		} else {
			me.app.setData(me.urlOrTree);
		}
	}.bind(this));
	
};



OpenSpendings.BubbleChart.Vector = function(x,y) {
	var me = this;
	me.x = x; 
	me.y = y;
	
	/*
	 * calculates the length of the vector
	 */
	this.length = function() {
		var me = this;
		return Math.sqrt(me.x*me.x + me.y * me.y);
	};
	
	/*
	 * changes the length of the vector<commit_msg>added interface for tooltip functions<commit_after>/*!
 * OpenSpendings BubbleChart 0.1
 *
 * Copyright (c) 2011 <NAME> (http://driven-by-data.net)
 * Licensed under the MIT license
 */
/*jshint undef: true, browser:true, jquery: true, devel: true */
/*global Raphael, TWEEN */

var OpenSpendings = OpenSpendings ? OpenSpendings : {}; 

OpenSpendings.BubbleChart = function(container, urlOrTree, hoverCallback, unhoverCallback) {
	var me = this;
	me.container = container;
	me.urlOrTree = urlOrTree;
	me.hoverCallback = hoverCallback;
	me.unhoverCallback = unhoverCallback;
		
	$(document).ready(function() {
		var me = this;
		me.app = new OpenSpendings.BubbleChart.Main(me.container, me.hoverCallback, me.unhoverCallback);
		if (typeof(me.urlOrTree) == "string") {
			me.app.loadData(me.urlOrTree);
		} else {
			me.app.setData(me.urlOrTree);
		}
	}.bind(this));
	
};



OpenSpendings.BubbleChart.Vector = function(x,y) {
	var me = this;
	me.x = x; 
	me.y = y;
	
	/*
	 * calculates the length of the vector
	 */
	this.length = function() {
		var me = this;
		return Math.sqrt(me.x*me.x + me.y * me.y);
	};
	
	/*
	 * changes the length of the vector
{'fraction_non_alphanumeric': 0.15080113100848255, 'fraction_numerical': 0.005655042412818096, 'mean_word_length': 3.5952380952380953, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2874522', 'n_tokens_mistral': 837, 'n_tokens_neox': 768, 'n_words': 174}