<commit_before><!DOCTYPE html>
<html>
<head>
    <title>{{ title }}</title>
    <script type="text/javascript" src="{{ STATIC_URL }}js/jquery.min.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}js/highcharts.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}js/themes/dark-unica.js"></script>

</head>
<body>
<div id="container" style="width:50%; height:400px"></div>
</body>
<script>

$(function () {
   $(document).ready(function(){
    var options = {
        chart: {
            renderTo: 'container',
            type: 'bar'
        },
        title: {
            text: "Average VGR Rating VS Processor Families"
        },
        xAxis: {
            title: {
                text: 'Processor Family'
            },
            categories: []
        },
        yAxis: {
            title: {
                text: 'Average VGR Rating'
            }
        },
        series: [{}]
    };

   $.getJSON('/plots/{{ plotname }}/data/',function(data){
       console.log(data.values);
       options.series[0].data = data.values;
       options.xAxis.categories = data.categories;
       Highcharts.setOptions(Highcharts.theme);
       var chart = new Highcharts.Chart(options);
	    });
   });
});

</script>
</html><commit_msg>Keep the chart configs dynamic in Chart Template<commit_after><!DOCTYPE html>
<html>
<head>
    <title>{{ title }}</title>
    <script type="text/javascript" src="{{ STATIC_URL }}js/jquery.min.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}js/highcharts.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}js/themes/dark-unica.js"></script>

</head>
<body>
<div id="container" style="width:50%; height:400px"></div>
</body>
<script>

$(function () {
   $(document).ready(function(){
    var options = {
        chart: {
            renderTo: 'container',
            type: ''
        },
        title: {
            text: ''
        },
        xAxis: {
            title: {
                text: ''
            },
            categories: []
        },
        yAxis: {
            title: {
                text: ''
            }
        },
        series: [{}]
    };

   $.getJSON('/plots/{{ plotname }}/data/',function(data){
       console.log(data.values);
       options.chart.type = data.chart_type;
       options.series[0].data = data.values;
       options.xAxis.categories = data.categories;
       options.title.text = data.chart_title;
       options.xAxis.title.text = data.xAxis_title_text;
       options.yAxis.title.text = data.yAxis_title_text;
       Highcharts.setOptions(Highcharts.theme);
       var chart = new Highcharts.Chart(options);
	    });
   });
});

</script>
</html>
{'fraction_non_alphanumeric': 0.1731123388581952, 'fraction_numerical': 0.004419889502762431, 'mean_word_length': 2.0793650793650795, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, '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': '2197735', 'n_tokens_mistral': 859, 'n_tokens_neox': 820, 'n_words': 152}