qlik-oss/sn-scatter-plot

View on GitHub

Showing 56 of 199 total issues

Consider simplifying this complex logical expression.
Open

    if (
      options.chartAnimations === false ||
      interactionInProgress ||
      meta.isPartialUpdating ||
      meta.isSizeChanging ||
Severity: Critical
Found in src/models/chart-model/index.js - About 1 hr to fix

    Function createMiniChartNavigationWindow has 70 lines of code (exceeds 60 allowed). Consider refactoring.
    Open

    export default function createMiniChartNavigationWindow(chartModel, rtl) {
      const { RATIO, PADDING } = NUMBERS.MINI_CHART; // Padding from the bottom right corner
    
      // Current data view (corresponding to the rect of the navigation window)
      let dataView;
    Severity: Major
    Found in src/picasso-definition/components/mini-chart/navigation-window.js - About 1 hr to fix

      Function render has 67 lines of code (exceeds 60 allowed). Consider refactoring.
      Open

          render() {
            /* eslint-disable react/no-this-in-sfc */
            const {
              settings: {
                app,
      Severity: Major
      Found in src/picasso-components/react-components/data-title-component.jsx - About 1 hr to fix

        Function createHeatMap has 67 lines of code (exceeds 60 allowed). Consider refactoring.
        Open

        export default function createHeatMap(chartModel, animationsEnabled) {
          const viewHandler = chartModel.query.getViewHandler();
          const { transform } = viewHandler;
          const dataHandler = chartModel.query.getDataHandler();
          let binWidthPx;
        Severity: Major
        Found in src/picasso-definition/components/heat-map/index.js - About 1 hr to fix

          Function renderer has 63 lines of code (exceeds 60 allowed). Consider refactoring.
          Open

            return function renderer(opts = {}) {
              const { createElement = document.createElement.bind(document) } = opts;
          
              let el;
              let rect = createRendererBox();
          Severity: Major
          Found in src/picasso-components/react-components/react-renderer.js - About 1 hr to fix

            Consider simplifying this complex logical expression.
            Open

                  if (initialDataSrc && !node.data?.customTooltipAttrExps && !keysPerType[node.type]) {
                    // populate allDataNodes variable here, chart.findShapes can affect the performance
                    if (!allDataNodes) {
                      allDataNodes = [];
                      Object.keys(keysPerType).forEach((type) => {
            Severity: Major
            Found in src/custom-tooltip/utils.js - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

                  if (Array.isArray(maxNumLines)) {
                    maxNumLines.forEach((v) => {
                      totalMaxNumLines += Number.isNaN(v) || v <= 0 || !v ? 0 : v;
                    });
              
              
              Severity: Major
              Found in src/utils/text-helper.js - About 1 hr to fix

                Function imageData has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                export default function imageData(range, axis, dataView, dirtyImageData, width, height, rtl) {
                Severity: Major
                Found in src/picasso-components/heat-map-highlight/extract-image-data.js - About 50 mins to fix

                  Function tokenize has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    tokenize(text, font, ellipsis, maxNumLines, maxWidth, maxHeight, lineHeightMultiplicator = 1) {
                  Severity: Major
                  Found in src/utils/text-helper.js - About 50 mins to fix

                    Function changeTo has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    function changeTo(model, index, altIndex, listAttr, onChange, skipAttributeExpressions) {
                    Severity: Minor
                    Found in src/utils/data-title-utils.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                  if (
                                    textHelper.measureTextWidth(`${remainder} ${cLines[i + 1]}`) > width &&
                                    result.length + cLines.length - i <= maxNumLines
                                  ) {
                                    // If adding to the next line will force that to break as well and we are not close to the max limit, then create a new line inbetween instead
                      Severity: Major
                      Found in src/utils/text-helper.js - About 45 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) return true;
                        Severity: Major
                        Found in src/picasso-definition/interactions/is-zoom-by-image.js - About 40 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                            if (app && (app.session?.options || app.enigmaModel?.session?.sessionConfig || app.session?.config?.url)) {
                              config = app.session.options || app.enigmaModel?.session.sessionConfig;
                          
                              // fix for usage in mashups
                              if (!config) {
                          Severity: Major
                          Found in src/custom-tooltip/promises/images.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;
                                return dataPages.length === 1 && !qMatrix.length && !qLeft && !qTop && !qWidth && !qHeight;
                              }
                            Severity: Major
                            Found in src/data-handler/is-binned-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/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

                                  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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language