Sha256: 9daa8eaf6772efc9801dde979d70486ffb6dff2e1c37feaaaa9152256b611bc6

Contents?: true

Size: 1.55 KB

Versions: 19

Compression:

Stored size: 1.55 KB

Contents

function humanFileSize(size) {
  if(size < 1024) return size;
  var i = Math.floor( Math.log(size) / Math.log(1024) );
  return ( size / Math.pow(1024, i) ).toFixed(2) * 1  + ['B', 'kB', 'MB', 'GB', 'TB'][i];
};

google.charts.load('43', {packages: ['line']});

if (typeof reportData !== 'undefined' && reportData) {
  google.charts.setOnLoadCallback(drawChart);
}

function drawChart() {
  var simplicityData, simplicityTable, simplicityOptions, simplicityChart,
  sizeData, sizeTable, sizeOptions, sizeChart,
  formatter;

  simplicityData = reportData.reverse().map(function(e){return [e.version, e.rules, e.selectors]});
  simplicityData.unshift(['Version', 'Rules', 'Selectors']);
  simplicityTable = google.visualization.arrayToDataTable(simplicityData);

  simplicityOptions = {
    chart: {
      title: 'Simplicity chart',
      subtitle: 'Evolution of rules and selectors over uStyle releases',
      vAxis: {
        format: ''
      }
    }
  };

  sizeData = reportData.map(function(e){return [e.version, e.size]});
  sizeData.unshift(['Version', 'Size (bytes)']);
  sizeTable = google.visualization.arrayToDataTable(sizeData);

  sizeOptions = {
    chart: {
      title: 'Size chart',
      subtitle: 'Evolution of uStyle size over releases',
      vAxis: {
        format: ''
      }
    }
  };

  simplicityChart = new google.charts.Line(document.getElementById('simplicity_chart'));
  simplicityChart.draw(simplicityTable, simplicityOptions);

  sizeChart = new google.charts.Line(document.getElementById('size_chart'));
  sizeChart.draw(sizeTable, sizeOptions);
};

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
ustyle-1.15.3 styleguide/assets/javascripts/modules/stats.js
ustyle-1.14.11 styleguide/assets/javascripts/modules/stats.js
ustyle-1.14.10 styleguide/assets/javascripts/modules/stats.js
ustyle-1.14.0 styleguide/assets/javascripts/modules/stats.js
ustyle-1.12.6 styleguide/assets/javascripts/modules/stats.js
ustyle-1.12.1 styleguide/assets/javascripts/modules/stats.js
ustyle-1.12.0 styleguide/assets/javascripts/modules/stats.js
ustyle-1.11.1 styleguide/assets/javascripts/modules/stats.js
ustyle-1.10.0 styleguide/assets/javascripts/modules/stats.js
ustyle-1.8.7 styleguide/assets/javascripts/modules/stats.js
ustyle-1.8.1 styleguide/assets/javascripts/modules/stats.js
ustyle-1.8.0 styleguide/assets/javascripts/modules/stats.js
ustyle-1.7.0 styleguide/assets/javascripts/modules/stats.js
ustyle-1.6.1 styleguide/assets/javascripts/modules/stats.js
ustyle-1.5.8 styleguide/assets/javascripts/modules/stats.js
ustyle-1.4.1 styleguide/assets/javascripts/modules/stats.js
ustyle-1.4.0 styleguide/assets/javascripts/modules/stats.js
ustyle-1.3.12 styleguide/assets/javascripts/modules/stats.js
ustyle-1.3.6 styleguide/assets/javascripts/modules/stats.js