seerline/clchart

View on GitHub
src/chart/cl.chart.line.js

Summary

Maintainability
F
1 wk
Test Coverage

File cl.chart.line.js has 794 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Copyright (c) 2018-present clchart Contributors.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
Severity: Major
Found in src/chart/cl.chart.line.js - About 1 day to fix

    Function calcMaxMin has a Cognitive Complexity of 78 (exceeds 5 allowed). Consider refactoring.
    Open

      calcMaxMin (data, extremum, start, stop) {
        const mm = {
          max: 0.0,
          min: 0.0
        }
    Severity: Minor
    Found in src/chart/cl.chart.line.js - About 1 day to fix

    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

    ClChartLine has 38 functions (exceeds 20 allowed). Consider refactoring.
    Open

    export default class ClChartLine {
      /**
    
       * Creates an instance of ClChartLine.
       * @param {Object} father line chart's parent context
    Severity: Minor
    Found in src/chart/cl.chart.line.js - About 5 hrs to fix

      Function setPublicRect has 85 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        setPublicRect () { // 计算所有矩形区域
          // rectChart 画图区
          // rectTitle rectMess
          // rectAxisX
          // rectScroll
      Severity: Major
      Found in src/chart/cl.chart.line.js - About 3 hrs to fix

        Function calcMaxMin has 84 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          calcMaxMin (data, extremum, start, stop) {
            const mm = {
              max: 0.0,
              min: 0.0
            }
        Severity: Major
        Found in src/chart/cl.chart.line.js - About 3 hrs to fix

          Function setButtons has 80 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            setButtons () {
              let chart
              let xx, yy
              let ww = 25 * this.scale
              if (this.hasButton('zoomin', this.buttons) || this.hasButton('zoomout', this.buttons)) {
          Severity: Major
          Found in src/chart/cl.chart.line.js - About 3 hrs to fix

            Function readyDraw has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
            Open

              readyDraw () { // 计算最大最小值等
                // 画滚动块
                this.readyScroll()
            
                // 求最大最小值
            Severity: Minor
            Found in src/chart/cl.chart.line.js - About 2 hrs to fix

            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 onMouseMove has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
            Open

              onMouseMove (event) {
                if (this.linkInfo.hideInfo) return
                if (!this.linkInfo.showCursorLine) return
                // this.draw_clear();
                // 找到X坐标对应的数据索引
            Severity: Minor
            Found in src/chart/cl.chart.line.js - About 1 hr to fix

            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 getMoveData has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

              getMoveData (index) {
                let lines = this.config.lines
                const out = []
                if (!Array.isArray(lines)) return out
            
            
            Severity: Minor
            Found in src/chart/cl.chart.line.js - About 1 hr to fix

            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 locationData has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              locationData () {
                if (this.data === undefined) return
                const size = getSize(this.data)
                if (this.config.axisX.type === 'day1') {
                  setFixedLineFlags(
            Severity: Minor
            Found in src/chart/cl.chart.line.js - About 1 hr to fix

              Function onMouseMove has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                onMouseMove (event) {
                  if (this.linkInfo.hideInfo) return
                  if (!this.linkInfo.showCursorLine) return
                  // this.draw_clear();
                  // 找到X坐标对应的数据索引
              Severity: Minor
              Found in src/chart/cl.chart.line.js - About 1 hr to fix

                Function setZoomInfo has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                Open

                  setZoomInfo () {
                    const info = this.config.zoomInfo
                    info.index = info.index > info.list.length - 1 ? info.list.length - 1 : info.index
                    info.index = info.index < 0 ? 0 : info.index
                    const value = info.list[info.index]
                Severity: Minor
                Found in src/chart/cl.chart.line.js - About 1 hr to fix

                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 setChildLines has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                Open

                  setChildLines () {
                    // l_kbar,l_line,l_nowvol,l_vbar l_nowline
                    let line
                    let clr = 0
                    for (let i = 0; i < this.config.lines.length; i++) {
                Severity: Minor
                Found in src/chart/cl.chart.line.js - About 1 hr to fix

                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 setPublicRect has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                Open

                  setPublicRect () { // 计算所有矩形区域
                    // rectChart 画图区
                    // rectTitle rectMess
                    // rectAxisX
                    // rectScroll
                Severity: Minor
                Found in src/chart/cl.chart.line.js - About 1 hr to fix

                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 getMoveData has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  getMoveData (index) {
                    let lines = this.config.lines
                    const out = []
                    if (!Array.isArray(lines)) return out
                
                
                Severity: Minor
                Found in src/chart/cl.chart.line.js - About 1 hr to fix

                  Function getDataRange has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                    getDataRange (data) {
                      const out = {
                        minIndex: -1,
                        maxIndex: -1
                      }
                  Severity: Minor
                  Found in src/chart/cl.chart.line.js - About 45 mins to fix

                  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 onMouseWheel has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                    onMouseWheel (event) {
                      if (this.config.zoomInfo === undefined) return
                  
                      let step = Math.floor(event.deltaY / 10)
                      if (step === 0) step = event.deltaY > 0 ? 1 : -1
                  Severity: Minor
                  Found in src/chart/cl.chart.line.js - About 35 mins to fix

                  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

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      if (!isEmptyArray(extremum.maxvalue)) {
                        for (let m = 0; m < extremum.maxvalue.length; m++) {
                          if (typeof (extremum.maxvalue[m]) === 'number') {
                            mm.max = extremum.maxvalue[m]
                            break
                  Severity: Major
                  Found in src/chart/cl.chart.line.js and 1 other location - About 2 hrs to fix
                  src/chart/cl.chart.line.js on lines 748..755

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 76.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      if (!isEmptyArray(extremum.minvalue)) {
                        for (let m = 0; m < extremum.minvalue.length; m++) {
                          if (typeof (extremum.minvalue[m]) === 'number') {
                            mm.min = extremum.minvalue[m]
                            break
                  Severity: Major
                  Found in src/chart/cl.chart.line.js and 1 other location - About 2 hrs to fix
                  src/chart/cl.chart.line.js on lines 740..747

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 76.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                        tail = formatShowTime(this.data.key, tail,
                          this.father.dataLayer.tradeTime[this.father.dataLayer.tradeTime.length - 1].end)
                  Severity: Major
                  Found in src/chart/cl.chart.line.js and 1 other location - About 1 hr to fix
                  src/chart/cl.chart.line.js on lines 804..805

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 61.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                        right = formatShowTime(this.data.key, right,
                          this.father.dataLayer.tradeTime[this.father.dataLayer.tradeTime.length - 1].end)
                  Severity: Major
                  Found in src/chart/cl.chart.line.js and 1 other location - About 1 hr to fix
                  src/chart/cl.chart.line.js on lines 809..810

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 61.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      if (this.config.axisY.right.display !== 'none') {
                        draw = new ClDrawAxisY(this, this.rectAxisYRight, 'right')
                        this.childDraws['AXISY_RIGHT'] = draw
                      }
                  Severity: Major
                  Found in src/chart/cl.chart.line.js and 1 other location - About 1 hr to fix
                  src/chart/cl.chart.line.js on lines 313..316

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 59.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      if (this.config.axisY.left.display !== 'none') {
                        draw = new ClDrawAxisY(this, this.rectAxisYLeft, 'left')
                        this.childDraws['AXISY_LEFT'] = draw
                      }
                  Severity: Major
                  Found in src/chart/cl.chart.line.js and 1 other location - About 1 hr to fix
                  src/chart/cl.chart.line.js on lines 317..320

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 59.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      this.rectMess = {
                        left: this.rectMain.left,
                        top: this.rectMain.top,
                        width: 0,
                        height: 0
                  Severity: Minor
                  Found in src/chart/cl.chart.line.js and 1 other location - About 40 mins to fix
                  src/chart/cl.chart.line.js on lines 152..157

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 48.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      this.rectTitle = {
                        left: this.rectMain.left,
                        top: this.rectMain.top,
                        width: 0,
                        height: 0
                  Severity: Minor
                  Found in src/chart/cl.chart.line.js and 1 other location - About 40 mins to fix
                  src/chart/cl.chart.line.js on lines 158..163

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 48.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 6 locations. Consider refactoring.
                  Open

                      _drawRect(this.context, this.rectMain.left, this.rectMain.top, this.rectMain.width, this.rectMain.height)
                  Severity: Major
                  Found in src/chart/cl.chart.line.js and 5 other locations - About 35 mins to fix
                  src/chart/cl.chart.board.js on lines 228..228
                  src/chart/cl.chart.board.js on lines 425..425
                  src/chart/cl.chart.button.js on lines 155..155
                  src/chart/cl.chart.scroll.js on lines 317..318
                  src/plugins/cl.super.js on lines 280..280

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 47.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                        if (this.config.axisY.right.display !== 'none') axisInfo.right -= this.layout.axisX.width
                  Severity: Minor
                  Found in src/chart/cl.chart.line.js and 1 other location - About 35 mins to fix
                  src/chart/cl.chart.line.js on lines 186..186

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 47.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                        if (this.config.axisY.left.display !== 'none') axisInfo.left += this.layout.axisX.width
                  Severity: Minor
                  Found in src/chart/cl.chart.line.js and 1 other location - About 35 mins to fix
                  src/chart/cl.chart.line.js on lines 187..187

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 47.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                          if (this.config.zoomInfo.index < this.config.zoomInfo.list.length - 1) {
                            this.config.zoomInfo.index++
                            this.setZoomInfo()
                            this.father.onPaint()
                          }
                  Severity: Minor
                  Found in src/chart/cl.chart.line.js and 1 other location - About 30 mins to fix
                  src/chart/cl.chart.line.js on lines 408..412

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 45.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                          if (this.config.zoomInfo.index > 0) {
                            this.config.zoomInfo.index--
                            this.setZoomInfo()
                            this.father.onPaint()
                          }
                  Severity: Minor
                  Found in src/chart/cl.chart.line.js and 1 other location - About 30 mins to fix
                  src/chart/cl.chart.line.js on lines 429..433

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 45.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  There are no issues that match your filters.

                  Category
                  Status