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

    Interface MosaicDeclaration

    A stacked bar chart whose bar widths also encode data — a mosaic or marimekko, a two-way contingency table drawn as tiles.

    Read as a plain stacked bar it loses the width entirely, which is half the table: the conditional proportions arrive without the group sizes they were computed from, so a category of six people and one of six hundred read identically.

    Always declared, never detected. A non-uniform width array on a stacked bar is a claim about how authors behave, not about what the data means, and a false positive would announce every column's width as a share of all observations — a number the chart does not contain.

    interface MosaicDeclaration {
        title?: string;
        name?: string;
        type: MOSAIC;
        width?: string;
        count?: 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: MOSAIC

    TraceType.MOSAIC — the string 'mosaic'.

    width?: string

    Field holding the category's share of all observations, as a fraction of one — the width its column is drawn at. Maps to MosaicPoint.width.

    'width'
    
    count?: string

    Field holding the cell's own count, when the producer has the contingency table. Maps to MosaicPoint.count.

    Optional because a producer working from proportions alone genuinely does not have it, and multiplying out a rounded share would put a number in the announcement that the data does not contain.

    'count', falling back to length, value, n or total