packages/mermaid/src/diagrams/timeline/timelineRenderer.ts
Function draw
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const draw = function (text: string, id: string, version: string, diagObj: Diagram) {
//1. Fetch the configuration
const conf = getConfig();
// @ts-expect-error - wrong config?
const LEFT_MARGIN = conf.leftMargin ?? 50;
File timelineRenderer.ts
has 278 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// @ts-nocheck - don't check until handle it
import type { Selection } from 'd3';
import { select } from 'd3';
import svgDraw from './svgDraw.js';
import { log } from '../../logger.js';
Function drawTasks
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const drawTasks = function (
diagram: Selection<SVGElement, unknown, null, undefined>,
tasks: TimelineTask[],
sectionColor: number,
masterX: number,
Function drawTasks
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
diagram: Selection<SVGElement, unknown, null, undefined>,
tasks: TimelineTask[],
sectionColor: number,
masterX: number,
masterY: number,
Function drawEvents
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
diagram: Selection<SVGElement, unknown, null, undefined>,
events: string[],
sectionColor: number,
masterX: number,
masterY: number,