Showing 332 of 436 total issues
Function translate
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
translate: function () {
var series = this,
chart = series.chart,
options = series.options,
borderWidth = options.borderWidth,
Function setStackedPoints
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setStackedPoints: function () {
if (!this.options.stacking || (this.visible !== true && this.chart.options.chart.ignoreHiddenSeries !== false)) {
return;
}
Function symbol
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
symbol: function (symbol, x, y, width, height, options) {
var obj,
// get the symbol definition function
Function handleOverflow
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handleOverflow: function (legendHeight) {
var legend = this,
chart = this.chart,
renderer = chart.renderer,
pageCount,
Function getCurrentRegionTooltip
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getCurrentRegionTooltip: function () {
var options = this.options,
header = '',
entries = [],
fields, formats, formatlen, fclass, text, i,
Function drawPoints
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
drawPoints: function () {
var series = this,
pointAttr,
points = series.points,
chart = series.chart,
Function translate
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
translate: function () {
if (!this.processedXData) { // hidden series
this.processData();
}
this.generatePoints();
Function drawTracker
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
drawTracker: function () {
var series = this,
options = series.options,
trackByArea = options.trackByArea,
trackerPath = [].concat(trackByArea ? series.areaPath : series.graphPath),
Function init
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init: function (chart, userOptions) {
var isXAxis = userOptions.isX,
axis = this;
Function getPointSpline
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getPointSpline: function (segment, point, i) {
var smoothing = 1.5, // 1 means control points midway between points, 2 means 1/3 from the point, 3 is 1/4 etc
denom = smoothing + 1,
plotX = point.plotX,
plotY = point.plotY,
Method graph_values
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
Open
def graph_values(current_user)
categories = []
mapping_values = []
if ['numeric', 'integer', 'date', 'choices'].include?(self.variable_type)
- 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 renderRegion
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderRegion: function (valuenum, highlight) {
var vals = this.values[valuenum],
options = this.options,
xaxisOffset = this.xaxisOffset,
result = [],
Function pinchTranslateDirection
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
pinchTranslateDirection: function (horiz, pinchDown, touches, transform, selectionMarker, clip, lastValidTouch, forcedScale) {
var chart = this.chart,
xy = horiz ? 'x' : 'y',
XY = horiz ? 'X' : 'Y',
sChartXY = 'chart' + XY,
Function normalizeTimeTickInterval
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function normalizeTimeTickInterval(tickInterval, unitsOption) {
var units = unitsOption || [[
MILLISECOND, // unit name
[1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
], [
Method generate_sql_as_normal
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def generate_sql_as_normal(thesource)
result = "1 = 0"
result_hash = thesource.sql_codes(current_user)
sql_text = result_hash[:text]
Function getSegments
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getSegments: function () {
var segments = [],
segment = [],
keys = [],
xAxis = this.xAxis,
Function getContainer
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getContainer: function () {
var chart = this,
container,
optionsChart = chart.options.chart,
chartWidth,
Method directional_do!
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
Open
def directional_do!(position, direction)
current_position = self.history_position + position
if current_position >= 0 and current_position < self.history.size
history_hash = self.history[current_position].symbolize_keys
qc = Criterium.find_by_id(history_hash[:id])
- 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 pinch
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
pinch: function (e) {
var self = this,
chart = self.chart,
pinchDown = self.pinchDown,
Function render
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render: function () {
var series = this,
chart = series.chart,
group,
options = series.options,