qlik-oss/sn-scatter-plot

View on GitHub

Showing 190 of 199 total issues

Consider simplifying this complex logical expression.
Open

  if (dataPages.length) {
    const { qMatrix, qArea } = dataPages[0];
    const { qLeft, qTop, qWidth, qHeight } = qArea;
    const isBinnedData = dataPages.length === 1 && !qMatrix.length && !qLeft && !qTop && !qWidth && !qHeight;
    if (isBinnedData) {
Severity: Major
Found in src/data-handler/is-large-num-bubbles-from-big-data.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

      if (dataPages.length) {
        const { qMatrix, qArea } = dataPages[0];
        const { qLeft, qTop, qWidth, qHeight } = qArea;
        const isBinnedData = dataPages.length === 1 && !qMatrix.length && !qLeft && !qTop && !qWidth && !qHeight;
        if (isBinnedData) {
    Severity: Major
    Found in src/utils/get-num-points-in-big-data.js - About 40 mins to fix

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

        useEffect(() => {
          if (!constraints) {
            return;
          }
      
      
      Severity: Minor
      Found in src/hooks/use-actions/use-lasso.js and 1 other location - About 40 mins to fix
      src/hooks/use-actions/use-select.js on lines 15..21

      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

          const currentLength = Math.max(...currentYTicks.map((t) => formatter(t.value).toString().length));
      Severity: Minor
      Found in src/models/chart-model/should-update-ticks.js and 1 other location - About 40 mins to fix
      src/models/chart-model/should-update-ticks.js on lines 10..10

      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

            fill: {
              scale: KEYS.SCALE.HEAT_MAP_COLOR,
              fn: (d) => d.scale(d.datum.binDensity.value),
            },
      Severity: Minor
      Found in src/picasso-definition/components/heat-map/index.js and 1 other location - About 40 mins to fix
      src/picasso-definition/components/mini-chart/mini-points.js on lines 59..62

      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

            fill: {
              scale: KEYS.SCALE.HEAT_MAP_COLOR,
              fn: (d) => d.scale(d.datum.value.qNum),
            },
      Severity: Minor
      Found in src/picasso-definition/components/mini-chart/mini-points.js and 1 other location - About 40 mins to fix
      src/picasso-definition/components/heat-map/index.js on lines 38..41

      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

          const preCalcLength = Math.max(...preCalcYTicks.map((t) => formatter(t.value).toString().length));
      Severity: Minor
      Found in src/models/chart-model/should-update-ticks.js and 1 other location - About 40 mins to fix
      src/models/chart-model/should-update-ticks.js on lines 9..9

      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

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

        useEffect(() => {
          if (!constraints) {
            return;
          }
      
      
      Severity: Minor
      Found in src/hooks/use-actions/use-select.js and 1 other location - About 40 mins to fix
      src/hooks/use-actions/use-lasso.js on lines 13..19

      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

          fontFamilyItem: {
            component: 'dropdown',
            ref: pathFontFamily,
            options: () => fontResolver.getOptions(pathFontFamily),
            defaultValue: () => fontResolver.getDefaultValue(pathFontFamily),
      src/ext/property-definition/styling-definitions/styling-utils.js on lines 15..20

      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

              fontSizeItem: {
                component: 'dropdown',
                ref: pathFontSize,
                options: () => fontResolver.getOptions(pathFontSize),
                defaultValue: () => fontResolver.getDefaultValue(pathFontSize),
      src/ext/property-definition/styling-definitions/styling-utils.js on lines 6..11

      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

      Function wrapText has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        wrapText(text, maxWidth, font, maxNumLines, ellipsis) {
      Severity: Minor
      Found in src/utils/text-helper.js - About 35 mins to fix

        Function getSize has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          getSize(dockService, chartModel, chart, dimension, layoutService) {
        Severity: Minor
        Found in src/models/tick-model/ticks/tick-helper.js - About 35 mins to fix

          Function getTicksAndMinMax has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            getTicksAndMinMax(scale, nicing, count, originalMin, originalMax) {
          Severity: Minor
          Found in src/models/tick-model/ticks/tick-helper.js - About 35 mins to fix

            Function set has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                          set(value, setter, def, args, data) {
            Severity: Minor
            Found in src/ext/property-definition/index.js - About 35 mins to fix

              Function areIntervalsEqual has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              function areIntervalsEqual(min1, max1, min2, max2, e) {
              Severity: Minor
              Found in src/view-handler/index.js - About 35 mins to fix

                Function set has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                              set(value, setter, def, args, data) {
                Severity: Minor
                Found in src/ext/property-definition/index.js - About 35 mins to fix

                  Function set has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                                set(value, setter, def, args, data) {
                  Severity: Minor
                  Found in src/ext/property-definition/index.js - About 35 mins to fix

                    Function set has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                                  set(value, setter, definition, args, data) {
                    Severity: Minor
                    Found in src/ext/property-definition/index.js - About 35 mins to fix

                      Function wordWrap has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        wordWrap(lines, width, font, maxNumLines, ellipsis) {
                      Severity: Minor
                      Found in src/utils/text-helper.js - About 35 mins to fix

                        Function set has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                      set(value, setter, definition, args, data) {
                        Severity: Minor
                        Found in src/ext/property-definition/index.js - About 35 mins to fix
                          Severity
                          Category
                          Status
                          Source
                          Language