qlik-oss/sn-scatter-plot

View on GitHub

Showing 56 of 199 total issues

Function propertyDefinition has 672 lines of code (exceeds 60 allowed). Consider refactoring.
Open

export default function propertyDefinition(env) {
  const { flags, translator, sense } = env;
  const theme = sense?.theme;

  // Feature Flags for Styling Panel
Severity: Major
Found in src/ext/property-definition/index.js - About 3 days to fix

    Function createDataTitileComp has 372 lines of code (exceeds 60 allowed). Consider refactoring.
    Open

    export default function createDataTitileComp() {
      function HyperDataItem({ title, selected, onClick }) {
        const localDir = rtlUtils.detectTextDirection(title);
        return (
          <ListItem role="menuitem" onClick={onClick} style={{ textAlign: 'start' }}>
    Severity: Major
    Found in src/picasso-components/react-components/data-title-component.jsx - About 1 day to fix

      File index.js has 684 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* eslint-disable no-param-reassign */
      import { setValue, getValue } from 'qlik-chart-modules';
      import trendlineDefinition from './trendlines-definition';
      import showCompressionResolution from '../show-compression-resolution';
      import colorModeOptions from './color-mode-options';
      Severity: Major
      Found in src/ext/property-definition/index.js - About 1 day to fix

        File data-title-component.jsx has 431 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /* eslint-disable react/destructuring-assignment */
        import { getValue } from 'qlik-chart-modules';
        import React from 'react';
        import PropTypes from 'prop-types';
        import { Button, Popover, List, ListItemIcon, ListItem, ListItemText } from '@material-ui/core'; // eslint-disable-line
        Severity: Minor
        Found in src/picasso-components/react-components/data-title-component.jsx - About 6 hrs to fix

          File index.js has 356 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /* eslint-disable no-param-reassign */
          import extend from 'extend';
          import KEYS from '../../constants/keys';
          import NUMBERS from '../../constants/numbers';
          import createViewHandler from '../../view-handler';
          Severity: Minor
          Found in src/models/chart-model/index.js - About 4 hrs to fix

            File utils.js has 329 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import rtlUtils from '../utils/rtl-utils';
            import TOOLTIP from './constants';
            import customTooltipPromises from './promises';
            import tooltipChart from './chart/index';
            
            
            Severity: Minor
            Found in src/custom-tooltip/utils.js - About 3 hrs to fix

              Function createExtremumModel has 123 lines of code (exceeds 60 allowed). Consider refactoring.
              Open

              export default function createExtremumModel(layoutService, viewStateOptions = {}) {
                function resolveExtrema(scaleName) {
                  // Choose between data min/max and explicit min/max. Explicit values have higher priority
                  const measurePath = scaleName === KEYS.SCALE.X ? 'qMeasureInfo.0' : 'qMeasureInfo.1';
                  const measureIndex = scaleName === KEYS.SCALE.X ? 0 : 1;
              Severity: Major
              Found in src/models/extremum-model/index.js - About 3 hrs to fix

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

                    render() {
                      const { titleData, popover, translator, disabled, isDimension, padding, minWidth, hasAlternative } = this.props;
                      const textStyle = {
                        flex: '1 1 auto',
                        overflow: 'hidden',
                Severity: Major
                Found in src/picasso-components/react-components/data-title-component.jsx - About 3 hrs to fix

                  Function exploreDefinition has 102 lines of code (exceeds 60 allowed). Consider refactoring.
                  Open

                  export default function exploreDefinition() {
                    return {
                      type: 'items',
                      component: 'accordion',
                      items: {
                  Severity: Major
                  Found in src/ext/explore-definition/index.js - About 2 hrs to fix

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

                      render() {
                        const { scale, rect, symbol } = this;
                        const labels = labelHelper.resolveLabels(this.settings.labels);
                        if (scale.domain().length <= 0 || labels.length <= 0) {
                          return false;
                    Severity: Major
                    Found in src/picasso-components/ref-line-labels/index.js - About 2 hrs to fix

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

                        render() {
                          const DY = DISTANCE - 1;
                          const { settings } = this.settings;
                          const { target, label, showLabel, mode, debugMode, maxVisibleBubblesForLabeling } = settings;
                          const key = target.point;
                      Severity: Major
                      Found in src/picasso-components/point-label/index.js - About 2 hrs to fix

                        Function r has 95 lines of code (exceeds 60 allowed). Consider refactoring.
                        Open

                        export default function r() {
                          const isNotNumber = (x) => typeof x !== 'number' || Number.isNaN(x);
                          function createRendererBox({ x, y, width, height, scaleRatio, margin } = {}) {
                            const box = {
                              x: 0,
                        Severity: Major
                        Found in src/picasso-components/react-components/react-renderer.js - About 2 hrs to fix

                          Function qBrush has 95 lines of code (exceeds 60 allowed). Consider refactoring.
                          Open

                          export default function qBrush(brush, layout, opts = {}) {
                            const selections = [];
                            const methods = {};
                            const isActive = brush.isActive();
                            let hasValues = false;
                          Severity: Major
                          Found in src/services/selection-service/bin-selection/q-brush.js - About 2 hrs to fix

                            Function resolveExtrema has 95 lines of code (exceeds 60 allowed). Consider refactoring.
                            Open

                              function resolveExtrema(scaleName) {
                                // Choose between data min/max and explicit min/max. Explicit values have higher priority
                                const measurePath = scaleName === KEYS.SCALE.X ? 'qMeasureInfo.0' : 'qMeasureInfo.1';
                                const measureIndex = scaleName === KEYS.SCALE.X ? 0 : 1;
                                let minFromLayout = layoutService.getHyperCubeValue(`${measurePath}.qMin`, 0);
                            Severity: Major
                            Found in src/models/extremum-model/index.js - About 2 hrs to fix

                              File text-helper.js has 264 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              let dummyContext;
                              
                              function setDummyContext() {
                                dummyContext = dummyContext || document.createElement('canvas').getContext('2d');
                              }
                              Severity: Minor
                              Found in src/utils/text-helper.js - About 2 hrs to fix

                                Function objectDefinition has 89 lines of code (exceeds 60 allowed). Consider refactoring.
                                Open

                                const objectDefinition = () => {
                                  /**
                                   * @lends properties
                                   */
                                  const definition = {
                                Severity: Major
                                Found in src/qae/object-definition.js - About 2 hrs to fix

                                  Function createMiniChartPoints has 86 lines of code (exceeds 60 allowed). Consider refactoring.
                                  Open

                                  export default function createMiniChartPoints(chartModel, rtl) {
                                    const { RATIO, PADDING } = NUMBERS.MINI_CHART; // Padding from the bottom right corner
                                  
                                    // Padding, normalized to chart size
                                    const padding = { x: 0, y: 0 };
                                  Severity: Major
                                  Found in src/picasso-definition/components/mini-chart/mini-points.js - About 2 hrs to fix

                                    Function getStylingItems has 82 lines of code (exceeds 60 allowed). Consider refactoring.
                                    Open

                                    const getStylingItems = (flags, translator, theme) => {
                                      const items = {};
                                      const fontResolver = createFontResolver({
                                        theme,
                                        translator,

                                      Function disclaimer has 80 lines of code (exceeds 60 allowed). Consider refactoring.
                                      Open

                                      export default function disclaimer() {
                                        class DisclaimerComponent extends React.Component {
                                          render() {
                                            const { label, spanStyle } = this.props;
                                      
                                      
                                      Severity: Major
                                      Found in src/picasso-components/react-components/disclaimer.jsx - About 1 hr to fix

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

                                          render() {
                                            const { element } = this.chart;
                                            const heatMapCanvas = element.querySelector(`[data-key=${KEYS.COMPONENT.HEAT_MAP}]`);
                                            const heatMapHighlightCanvas = this.renderer.element();
                                            if (!heatMapCanvas || !heatMapHighlightCanvas) {
                                        Severity: Major
                                        Found in src/picasso-components/heat-map-highlight/index.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language