fcharts-js - v0.3.0
    Preparing search index...

    Interface AnnotationSpec

    An event marker on the time series — a dot on the nearest sample of a series, or a vertical rule, at an x position, with a label (e.g. "GSR +$2.0M"). Events are half the story on a portfolio chart: a climbing line without the allocation markers hides that a jump was new capital, not yield.

    interface AnnotationSpec {
        color?: string;
        kind?: "point" | "rule";
        label: string;
        seriesIndex?: number;
        showLabel?: boolean;
        x: number;
    }
    Index

    Properties

    color?: string

    Mark color; defaults to the target series' color, else a neutral. Shape + label carry the meaning too, so the mark is never color-only (WCAG 1.4.1).

    kind?: "point" | "rule"

    point = a diamond on the nearest sample of seriesIndex; rule = a vertical line. Default point.

    label: string

    Short description of the event (announced, shown in the readout, listed in the summary).

    seriesIndex?: number

    Which series' nearest sample a point marker sits on. Default 0.

    showLabel?: boolean

    Draw the always-on text label beside the marker. Default true. Set false for dense event sets (many markers on one chart): the marker still renders and the cursor readout + screen-reader announcement still surface the label on hover or keyboard select, but the static label is suppressed so a cluster of events doesn't collapse into overlapping text.

    x: number

    x position (data units) the annotation marks.