<commit_before>'use strict';
var Chart = require("chart.js");
var RadarChart = require("react-chartjs").Radar;
// To change other default settings, refer to : http://www.chartjs.org/docs/#getting-started-global-chart-configuration

Chart.defaults.global.scaleOverride=true;
Chart.defaults.global.scaleSteps=1;
Chart.defaults.global.scaleStepWidth=10;
Chart.defaults.global.scaleStartValue=0;


var chartOptions ={
    scaleShowLine : true,
    angleShowLineOut : false,
    scaleShowLabels : false,
    scaleBeginAtZero : true,
    angleLineColor : "rgba(255,255,255,.3)",
    scaleLineColor: "rgba(255,255,255,.4)",
    angleLineWidth : 1,
    responsive: true,
    pointLabelFontFamily : "'Viga', sans-serif",
    pointLabelFontStyle : "normal",
    pointLabelFontSize : 10,
    pointLabelFontColor : "#bdc3c7",
    pointDot : true,
    pointDotRadius : 3,
    pointDotStrokeWidth : 1,
    pointHitDetectionRadius : 20,
    datasetStroke : true,
    datasetStrokeWidth : 2,
    datasetFill : true,
    tooltipTemplate:"<%=label%>",
    tooltipFillColor: "rgba(0,0,0,0.8)",
    tooltipFontFamily: "'Viga', sans-serif",
    legendTemplate : ""
};

var AnimalThreats = React.createClass({
render: function(){
  var chartData = {
    labels: ["Habitat loss", "Climate change", "Alien Species", "Disease", "Fire", "Fishing Activities", "Other Human Activities", "Others"],
   
    };
    return (<div className="threats clearfix"> <label className="meta block center"> Threats </label><div className="clearfix chart"><RadarChart width="1024" height="512" data={chartData} options={chartOptions}/></div></div>);
  }
});

module.exports = AnimalThreats;<commit_msg>Datasets to use during rendering animal threats<commit_after>'use strict';
var Chart = require("chart.js");
var RadarChart = require("react-chartjs").Radar;
// To change other default settings, refer to : http://www.chartjs.org/docs/#getting-started-global-chart-configuration

Chart.defaults.global.scaleOverride=true;
Chart.defaults.global.scaleSteps=1;
Chart.defaults.global.scaleStepWidth=10;
Chart.defaults.global.scaleStartValue=0;


var chartOptions ={
    scaleShowLine : true,
    angleShowLineOut : false,
    scaleShowLabels : false,
    scaleBeginAtZero : true,
    angleLineColor : "rgba(255,255,255,.3)",
    scaleLineColor: "rgba(255,255,255,.4)",
    angleLineWidth : 1,
    responsive: true,
    pointLabelFontFamily : "'Viga', sans-serif",
    pointLabelFontStyle : "normal",
    pointLabelFontSize : 10,
    pointLabelFontColor : "#bdc3c7",
    pointDot : true,
    pointDotRadius : 3,
    pointDotStrokeWidth : 1,
    pointHitDetectionRadius : 20,
    datasetStroke : true,
    datasetStrokeWidth : 2,
    datasetFill : true,
    tooltipTemplate:"<%=label%>",
    tooltipFillColor: "rgba(0,0,0,0.8)",
    tooltipFontFamily: "'Viga', sans-serif",
    legendTemplate : ""
};

var AnimalThreats = React.createClass({
render: function(){
  var chartData = {
    labels: ["Habitat loss", "Climate change", "Alien Species", "Disease", "Fire", "Fishing Activities", "Other Human Activities", "Others"],
    datasets: [
        {
            label: "Threats",
            fillColor: "rgba(239,83,80,0.4)",
            strokeColor: "#ef5350",
            pointColor: "rgba(220,220,220,1)",
            pointStrokeColor: "#fff",
            pointHighlightFill: "#fff",
            pointHighlightStroke: "rgba(220,220,220,1)",
            data: this.props.threats
          }
        ]
    };
    return (<div className="threats clearfix"> <label className="meta block center"> Threats </label><div className="clearfix chart"><RadarChart width="1024" height="512" data={chartData} options={chartOptions}/></div></div>);
  }
});

module.exports = AnimalThreats;
{'fraction_non_alphanumeric': 0.14561544650040226, 'fraction_numerical': 0.03352105122016626, 'mean_word_length': 4.033738191632929, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1427674', 'n_tokens_mistral': 1264, 'n_tokens_neox': 1153, 'n_words': 238}