Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function computeEntityNameScale(sequences, heightPerEntity = 30) {
const domain = sequences.map(sequence => sequence[0] && sequence[0][ENTITY_ID]);
const height = sequences.length * heightPerEntity;
const scale = scalePoint({
clamp: true,
range: [0, height],
padding: 0.2,
domain,
});
return {
scale,
accessor: d => d[ENTITY_ID],
label: 'Entity id',
};
}