tomgi/git_stats

View on GitHub
templates/assets/export-csv.js

Summary

Maintainability
C
1 day
Test Coverage

Function getDataRows has 108 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    Highcharts.Chart.prototype.getDataRows = function () {
        var options = (this.options.exporting || {}).csv || {},
            xAxis,
            xAxes = this.xAxis,
            rows = {},
Severity: Major
Found in templates/assets/export-csv.js - About 4 hrs to fix

    File export-csv.js has 285 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * A Highcharts plugin for exporting data from a rendered chart as CSV, XLS or HTML table
     *
     * Author:   Torstein Honsi
     * Licence:  MIT
    Severity: Minor
    Found in templates/assets/export-csv.js - About 2 hrs to fix

      Function getContent has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function getContent(chart, href, extension, content, MIME) {
              var a,
                  blobObject,
                  name,
                  options = (chart.options.exporting || {}).csv || {},
      Severity: Minor
      Found in templates/assets/export-csv.js - About 1 hr to fix

        Function getCSV has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            Highcharts.Chart.prototype.getCSV = function (useLocalDecimalPoint) {
                var csv = '',
                    rows = this.getDataRows(),
                    options = (this.options.exporting || {}).csv || {},
                    itemDelimiter = options.itemDelimiter || ',', // use ';' for direct import to Excel
        Severity: Minor
        Found in templates/assets/export-csv.js - About 1 hr to fix

          Function getTable has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              Highcharts.Chart.prototype.getTable = function (useLocalDecimalPoint) {
                  var html = '<table><thead>',
                      rows = this.getDataRows();
          
                  // Transform the rows to HTML
          Severity: Minor
          Found in templates/assets/export-csv.js - About 1 hr to fix

            Function getContent has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                function getContent(chart, href, extension, content, MIME) {
            Severity: Minor
            Found in templates/assets/export-csv.js - About 35 mins to fix

              There are no issues that match your filters.

              Category
              Status