Showing 993 of 2,083 total issues
Function showTooltip
has 154 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function showTooltip(plot, series, neighbor) {
// neighbor looks like: {seriesIndex: i, pointIndex:j, gridData:p, data:s.data[j]}
// gridData should be x,y pixel coords on the grid.
// add the plot._gridPadding to that to get x,y in the target.
var hl = plot.plugins.highlighter;
Function pack
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.jqplot.MekkoAxisRenderer.prototype.pack = function(pos, offsets) {
var ticks = this._ticks;
var max = this.max;
var min = this.min;
var offmax = offsets.max;
Function SearchPanel
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function SearchPanel(name, mode, resultsPath)
{
if (!name || !mode || !resultsPath)
{ alert("Incorrect parameters to SearchPanel."); };
Function _create
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
var self = this,
doc = this.element[ 0 ].ownerDocument,
suppressKeyPress;
Function initBands
has 146 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.jqplot.LineRenderer.prototype.initBands = function(options, plot) {
// use bandData if no data specified in bands option
//var bd = this.renderer.bandData;
var bd = options.bandData || [];
var bands = this.renderer.bands;
Function createTicks
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.jqplot.CategoryAxisRenderer.prototype.createTicks = function() {
// we're are operating on an axis here
var ticks = this._ticks;
var userTicks = this.ticks;
var name = this.name;
Function _create
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
var self = this,
o = this.options,
existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
Method initialize
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
Open
def initialize(repo, issue)
puts issue.number if STDOUT.tty?
@repo = repo
@issue = issue
- 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 support
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.support = (function() {
var div = document.createElement( "div" ),
documentElement = document.documentElement,
all,
Function pack
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.jqplot.LogAxisRenderer.prototype.pack = function(pos, offsets) {
var lb = parseInt(this.base, 10);
var ticks = this._ticks;
var trans = function (v) { return Math.log(v)/Math.log(lb); };
var invtrans = function (v) { return Math.pow(Math.E, (Math.log(lb)*v)); };
Function pack
has 139 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.jqplot.TableLegendRenderer.prototype.pack = function(offsets) {
if (this.show) {
if (this.placement == 'insideGrid') {
switch (this.location) {
case 'nw':
Function _create
has 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
this.element.closest( "form" )
.unbind( "reset.button" )
.bind( "reset.button", formResetHandler );
Function parseOptions
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.parseOptions = function(options){
for (var i=0; i<this.preParseOptionsHooks.hooks.length; i++) {
this.preParseOptionsHooks.hooks[i].call(this, options);
}
for (var i=0; i<$.jqplot.preParseOptionsHooks.length; i++) {
Method burndown
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
Open
def burndown
return @_burndown if defined?(@_burndown)
@_burndown = read_attribute(:burndown)
@_burndown = nil if !@_burndown || @_burndown.size == 0
- 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
File jqplot.logAxisRenderer.js
has 387 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
* Version: 1.0.0
Function draw
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.jqplot.EnhancedLegendRenderer.prototype.draw = function(offsets, plot) {
var legend = this;
if (this.show) {
var series = this._series;
var s;
Function parseDate
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parseDate: function (format, value, settings) {
if (format == null || value == null)
throw 'Invalid arguments';
value = (typeof value == 'object' ? value.toString() : value + '');
if (value == '')
Function Color
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Color: function () {
var a, args = arguments;
this.updateRGB = function () {
this.h = Math.max(0, Math.min(this.h, 1));
Function draw
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.jqplot.PieLegendRenderer.prototype.draw = function() {
var legend = this;
if (this.show) {
var series = this._series;
Function _bindEvents
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_bindEvents: function(){
var self = this, button = this.button;
function clickHandler(){
self[ self._isOpen ? 'close' : 'open' ]();