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

    Interface PiePoint

    Data point for one slice of a pie chart.

    A pie layer's data is a flat PiePoint[] — one entry per slice, in the order the slices are drawn — never the nested group array the bar-family types use.

    y is strictly numeric, unlike BarPoint.y: it is both the sonified magnitude and the numerator of the slice's percentage, and a percentage derived from a string is not a percentage.

    There is deliberately no percentage field. The share of the whole is derived once in the model as y / sum(y) * 100, so an authored percentage can never disagree with the values it is supposedly derived from.

    interface PiePoint {
        x: string | number;
        y: number;
    }
    Index

    Properties

    x y

    Properties

    x: string | number

    Slice label, e.g. the category the slice stands for.

    y: number

    Slice magnitude. Negative values are not meaningful in a pie.