size: 'code_smells',
colors: ['sqale_rating']
},
- Coverage: { x: 'complexity', y: 'coverage', size: 'uncovered_lines' },
+ Coverage: { x: 'complexity', y: 'coverage', size: 'uncovered_lines', yDomain: [100, 0] },
Duplications: { x: 'ncloc', y: 'duplicated_lines', size: 'duplicated_blocks' },
project_overview: {
x: 'sqale_index',
y: 'coverage',
size: 'ncloc',
- colors: ['reliability_rating', 'security_rating']
+ colors: ['reliability_rating', 'security_rating'],
+ yDomain: [100, 0]
}
};
translate,
translateWithParameters
} from '../../../helpers/l10n';
-import { getBubbleMetrics, isProjectOverview } from '../utils';
+import { getBubbleMetrics, getBubbleYDomain, isProjectOverview } from '../utils';
import { RATING_COLORS } from '../../../helpers/constants';
/*:: import type { Component, ComponentEnhanced } from '../types'; */
/*:: import type { Metric } from '../../../store/metrics/actions'; */
formatXTick={formatXTick}
formatYTick={formatYTick}
onBubbleClick={this.handleBubbleClick}
+ yDomain={getBubbleYDomain(this.props.domain)}
/>
);
}
};
}
+export function getBubbleYDomain(domain /*: string */) {
+ return bubbles[domain].yDomain;
+}
+
export function isProjectOverview(metric /*: string */) {
return metric === PROJECT_OVERVEW;
}