myems-admin/js/plugins/flot/curvedLines.js

Summary

Maintainability
C
1 day
Test Coverage

Function init has 146 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function init(plot) {

        plot.hooks.processOptions.push(processOptions);

        //if the plugin is active register processDatapoints method
Severity: Major
Found in myems-admin/js/plugins/flot/curvedLines.js - About 5 hrs to fix

    Function calculateCurvePoints has 99 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function calculateCurvePoints(datapoints, curvedLinesOptions, yPos) {
    
                var points = datapoints.points, ps = datapoints.pointsize;
                var num = curvedLinesOptions.curvePointFactor * (points.length / ps);
    
    
    Severity: Major
    Found in myems-admin/js/plugins/flot/curvedLines.js - About 3 hrs to fix

      Function processDatapoints has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              function processDatapoints(plot, series, datapoints) {
                  var nrPoints = datapoints.points.length / datapoints.pointsize;
                  var EPSILON = 0.5; //pretty large epsilon but save
      
                  if (series.curvedLines.apply == true && series.originSeries === undefined && nrPoints > (1 + EPSILON)) {
      Severity: Minor
      Found in myems-admin/js/plugins/flot/curvedLines.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status