MAIDR Documentation - v4.4.0
    Preparing search index...

    Interface GanttDeclaration

    A schedule drawn as intervals along a shared axis — a gantt chart, a timeline, a swimlane diagram.

    What separates this from a bar chart is that both coordinates are positions on the same axis rather than a position and a magnitude. A bar has one number and a baseline; an interval has two numbers and no baseline, and the fact a reader is listening for — how long the interval is — is a difference between them that has to be announced rather than heard as a height.

    That difference is also why GanttDeclaration.unit matters more here than a unit does elsewhere: no charting library carries what a step of the axis is called, so without it a task is announced as "7 long" rather than "7 days".

    The variant is the schema an adapter reads a schedule through; no adapter reads a gantt block yet, so a chart declaring one today is read as the undeclared chart and told so. Adoption is a per-adapter change.

    // The block a Highcharts adapter reading schedules would take, on a series
    // whose rows name their ends the ordinary way
    { custom: { maidr: { type: 'gantt', x: 'resource', unit: 'days' } } }
    interface GanttDeclaration {
        title?: string;
        name?: string;
        type: GANTT;
        x?: string;
        start?: string;
        end?: string;
        label?: string;
        unit?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    title?: string

    Overrides the layer's announced title. Maps to MaidrLayer.title.

    Names the chart; use DeclarationBase.name to say which layer of it this is.

    name?: string

    Names this layer among sibling layers. Maps to MaidrLayer.name.

    Announced on a layer switch in place of the trace type, so a hue-split figure says "Male" and "Female" rather than "error_bar plot" twice.

    type: GANTT

    TraceType.GANTT — the string 'gantt'.

    x?: string

    Field holding the lane the interval belongs to — a task, a resource, a phase. Maps to GanttPoint.x.

    A lane commonly holds several intervals, and grouping is by this field's value, so a row that resolves nothing here is its own lane rather than joining another.

    'x', falling back to lane, category, label, name, key, group or task

    start?: string

    Field holding where the interval begins. Maps to GanttPoint.start.

    'start', falling back to from, begin, x0 or startDate

    end?: string

    Field holding where the interval ends. Maps to GanttPoint.end.

    'end', falling back to to, finish, x1 or endDate

    label?: string

    Field holding what this interval is called, when the lane is not already its name. Maps to GanttPoint.label.

    The chain is a schedule's own rather than the label chain every other declaration shares, which is the Manhattan identifier's (snp, gene, probe) and names nothing on a schedule.

    The x chain includes label, so a row that names its interval but not its lane resolves both fields to the same word. An adapter adopting this declaration should drop a label equal to the lane it sits in rather than emit it — an interval labelled with its own lane says the same thing twice. resolveFieldRef resolves the two names independently and does not compare them, so the drop belongs to the adopting adapter.

    'label', falling back to name, task, title or activity

    unit?: string

    What a unit of the axis is called: 'days', 'hours', 'weeks'. Maps to GanttData.unit.

    A literal word, not a field: the unit belongs to the chart and not to any row, and a per-row unit would let a producer emit intervals that disagree about what their numbers measure. Omitted, the trace announces a length without a unit rather than guessing one.