Showing 406 of 624 total issues
Function plotLineArea
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function plotLineArea(datapoints, axisx, axisy) {
var points = datapoints.points,
ps = datapoints.pointsize,
bottom = Math.min(Math.max(0, axisy.min), axisy.max),
i = 0, top, areaOpen = false,
Function computeFillBottoms
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function computeFillBottoms( plot, s, datapoints ) {
if ( s.fillBetween == null ) {
return;
}
Function defaultPrefilter
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function defaultPrefilter( elem, props, opts ) {
var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire,
anim = this,
style = elem.style,
orig = {},
Function setupTickGeneration
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setupTickGeneration(axis) {
var opts = axis.options;
// estimate number of ticks
var noTicks;
Function trigger
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
trigger: function( event, data, elem, onlyHandlers ) {
// Don't do events on text and comment nodes
if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
return;
}
Function stackData
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function stackData(plot, s, datapoints) {
if (s.stack == null || s.stack === false)
return;
var other = findMatchingSeries(s, plot.getData());
Function send
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send: function( headers, complete ) {
// Get a new xhr
var handle, i,
xhr = s.xhr();
Function events
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function (scope) {
var self = this,
S = self.S;
S(this.scope)
Function events
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function (scope) {
var self = this,
S = self.S;
S(this.scope)
Function clean
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
clean: function( elems, context, fragment, scripts ) {
var i, j, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags,
safe = context === document && safeFragment,
ret = [];
Function insertLegend
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function insertLegend() {
if (options.legend.container != null) {
$(options.legend.container).html("");
} else {
File jquery.flot.time.js
has 308 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* Pretty handling of time axes.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.
Consider simplifying this complex logical expression. Open
Open
if (!document.createElement('canvas').getContext) {
(function() {
// alias some functions to make (compiled) code shorter
Function submit_report
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
Open
def submit_report(request):
''' Save a report and returns result in JSON
Args:
request (:obj:`django.http.request.HttpRequest`): HTTP POST request with these arguments
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function drawBar
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function drawBar(x, y, b, barLeft, barRight, fillStyleCallback, axisx, axisy, c, horizontal, lineWidth) {
var left, right, bottom, top,
drawLeft, drawRight, drawTop, drawBottom,
tmp;
Function init
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function init(plot) {
plot.hooks.processOptions.push(function (plot, options) {
if (!options.axisLabels.show)
return;
Function appendFill
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function appendFill(ctx, lineStr, min, max) {
var fillStyle = ctx.fillStyle;
var arcScaleX = ctx.arcScaleX_;
var arcScaleY = ctx.arcScaleY_;
var width = max.x - min.x;
Function events
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function () {
var self = this,
S = self.S,
move_class = '',
right_postfix = '',
Function events
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function () {
var self = this,
S = self.S,
move_class = '',
right_postfix = '',
Function Animation
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Animation( elem, properties, options ) {
var result,
index = 0,
tweenerIndex = 0,
length = animationPrefilters.length,