<commit_before>﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<ChartScript GroupBy="Always">
  <Columns>
    <Column DisplayName="Sections" ColumnType="Groupable" IsGroupKey="true" />
    <Column DisplayName="Angle" ColumnType="Magnitude" />
  </Columns>
  <Parameters>
    <Parameter Name="InnerRadious" Type="Number" ValueDefinition="0" />
    <Parameter Name="Sort" Type="Enum" ValueDefinition="No | Ascending | Descending" />
  </Parameters>
  <Icon FileName="doughnut.png"><![CDATA[<KEY>]]></Icon>
  <Script><![CDATA[function DrawChart(chart, data) {

  var pInnerRadius = data.columns.c0.parameter1;
  var pSort = data.columns.c0.parameter2;
 
  var pStartAngle = data.columns.c1.parameter1;
  var pEndAngle = data.columns.c1.parameter2;

  var size = d3.scale.linear()
      .domain([0, d3.max(data.rows,function(r){return r.c1;})])
      .range([0, 1]);

  var r = d3.min([width / 2, height]) / 3;
  var rInner = r  * parseFloat(pInnerRadius);
  var color = d3.scale.category20().domain( data.rows.map(function (v) { return v.c0; }));
  
  var pie = d3.layout.pie()
      .sort(pSort == "Ascending"? function(a, b) {return d3.descending(size(a.c1), size(b.c1)) }  :
            pSort == "Descending"? function(a, b) {return d3.ascending(size(a.c1), size(b.c1)) }: null )
      .value(function (v) { return size(v.c1); });
    
   var arc = d3.svg.arc()     
       .outerRadius(r).innerRadius(rInner);
  
  chart.append('svg:g').attr('class', 'shape').attr('transform', translate(width / 2, height / 2))
    .enterData(pie(data.rows), 'g', 'slice')
      .append('svg:path').attr('class', 'shape')
      .attr('d', arc)
      .attr('fill', function (slice) { return slice.data.c0.color || color(slice.data.c0); })
      .attr('shape-rendering', 'initial')
      .attr('data-click', function (slice) { return getClickKeys(slice.data, data.columns); })
      .append('svg:title')<commit_msg>ChartScript Pie<commit_after>﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<ChartScript GroupBy="Always">
  <Columns>
    <Column DisplayName="Sections" ColumnType="Groupable" IsGroupKey="true" />
    <Column DisplayName="Angle" ColumnType="Magnitude" />
  </Columns>
  <Parameters>
    <Parameter Name="InnerRadious" Type="Number" ValueDefinition="0" />
    <Parameter Name="Sort" Type="Enum" ValueDefinition="No | Ascending | Descending" />
  </Parameters>
  <Icon FileName="doughnut.png"><![CDATA[<KEY>XK<KEY>]]></Icon>
  <Script><![CDATA[function DrawChart(chart, data) {

  var pInnerRadius = data.parameters.InnerRadious;
  var pSort = data.parameters.Sort;

  var size = d3.scale.linear()
      .domain([0, d3.max(data.rows,function(r){return r.c1;})])
      .range([0, 1]);

  var r = d3.min([width / 2, height]) / 3;
  var rInner = r  * parseFloat(pInnerRadius);
  var color = d3.scale.category20().domain( data.rows.map(function (v) { return v.c0; }));
  
  var pie = d3.layout.pie()
      .sort(pSort == "Ascending"? function(a, b) {return d3.descending(size(a.c1), size(b.c1)) }  :
            pSort == "Descending"? function(a, b) {return d3.ascending(size(a.c1), size(b.c1)) }: null )
      .value(function (v) { return size(v.c1); });
    
   var arc = d3.svg.arc()     
       .outerRadius(r).innerRadius(rInner);
  
  chart.append('svg:g').attr('class', 'shape').attr('transform', translate(width / 2, height / 2))
    .enterData(pie(data.rows), 'g', 'slice')
      .append('svg:path').attr('class', 'shape')
      .attr('d', arc)
      .attr('fill', function (slice) { return slice.data.c0.color || color(slice.data.c0); })
      .attr('shape-rendering', 'initial')
      .attr('data-click', function (slice) { return getClickKeys(slice.data, data.columns); })
      .append('svg:title')
{'fraction_non_alphanumeric': 0.19876443728176202, 'fraction_numerical': 0.0182648401826484, 'mean_word_length': 3.8743455497382198, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 2, '>': 34, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6074835', 'n_tokens_mistral': 1335, 'n_tokens_neox': 1305, 'n_words': 240}