<commit_before>
angular.module('metadataViewerApp').directive('forceChart', function() {
    function link(scope, element, attrs) {
        var width = document.body.clientWidth - 50,
            height = document.body.clientHeight - 50,
            color = d3.scale.category10();



        scope.$watch('data', function(data) {
            if(!data) { return; }

            var svg = d3.select(element[0]).append("svg")
                .attr("width", width)
                .attr("height", height + 100);

            var data_nodes = { nodes: data };

            var force = d3.layout.force()
                .nodes(data_nodes.nodes)
                .size([width, height])
                .charge([-10])<commit_msg>Make charge a function of size<commit_after>
angular.module('metadataViewerApp').directive('forceChart', function() {
    function link(scope, element, attrs) {
        var width = document.body.clientWidth - 50,
            height = document.body.clientHeight - 50,
            color = d3.scale.category10();



        scope.$watch('data', function(data) {
            if(!data) { return; }

            var svg = d3.select(element[0]).append("svg")
                .attr("width", width)
                .attr("height", height + 100);

            var data_nodes = { nodes: data };

            var force = d3.layout.force()
                .nodes(data_nodes.nodes)
                .size([width, height])
                .charge(function(d) { return -d.count * .01 })
{'fraction_non_alphanumeric': 0.1417058428475487, 'fraction_numerical': 0.020147750167897917, 'mean_word_length': 1.8544061302681993, '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': '1726916', 'n_tokens_mistral': 441, 'n_tokens_neox': 402, 'n_words': 85}