Showing 56 of 199 total issues
Consider simplifying this complex logical expression. Open
Open
if (
options.chartAnimations === false ||
interactionInProgress ||
meta.isPartialUpdating ||
meta.isSizeChanging ||
Function createMiniChartNavigationWindow
has 70 lines of code (exceeds 60 allowed). Consider refactoring. Open
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;
Function render
has 67 lines of code (exceeds 60 allowed). Consider refactoring. Open
Open
render() {
/* eslint-disable react/no-this-in-sfc */
const {
settings: {
app,
Function createHeatMap
has 67 lines of code (exceeds 60 allowed). Consider refactoring. Open
Open
export default function createHeatMap(chartModel, animationsEnabled) {
const viewHandler = chartModel.query.getViewHandler();
const { transform } = viewHandler;
const dataHandler = chartModel.query.getDataHandler();
let binWidthPx;
Function renderer
has 63 lines of code (exceeds 60 allowed). Consider refactoring. Open
Open
return function renderer(opts = {}) {
const { createElement = document.createElement.bind(document) } = opts;
let el;
let rect = createRendererBox();
Consider simplifying this complex logical expression. Open
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) => {
Consider simplifying this complex logical expression. Open
Open
if (Array.isArray(maxNumLines)) {
maxNumLines.forEach((v) => {
totalMaxNumLines += Number.isNaN(v) || v <= 0 || !v ? 0 : v;
});
Function imageData
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export default function imageData(range, axis, dataView, dirtyImageData, width, height, rtl) {
Function tokenize
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
tokenize(text, font, ellipsis, maxNumLines, maxWidth, maxHeight, lineHeightMultiplicator = 1) {
Function changeTo
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function changeTo(model, index, altIndex, listAttr, onChange, skipAttributeExpressions) {
Avoid deeply nested control flow statements. Open
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
Consider simplifying this complex logical expression. Open
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;
Consider simplifying this complex logical expression. Open
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) {
Consider simplifying this complex logical expression. Open
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;
}
Consider simplifying this complex logical expression. Open
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) {
Consider simplifying this complex logical expression. Open
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) {
Function wrapText
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
wrapText(text, maxWidth, font, maxNumLines, ellipsis) {
Function getSize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
getSize(dockService, chartModel, chart, dimension, layoutService) {
Function getTicksAndMinMax
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
getTicksAndMinMax(scale, nicing, count, originalMin, originalMax) {
Function set
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
set(value, setter, def, args, data) {