MAIDR JavaScript API
    Preparing search index...

    Function appendedPointPosition

    • Where the rebuilt trace holds a newly appended point, as the (row, col) Trace.getStateAt must be asked for to announce it.

      appendPointToMaidr answers this from the data alone, which is enough for a trace that navigates its points in the order they arrived. A scatter does not: it sorts by x and groups the duplicates, so the raw index it carries in col addresses a different point, or a column that does not exist — the announcement was then silent (the lookup threw and the controller swallowed it) or named whichever point sorted last.

      Asked of the trace rather than recomputed here, so the grouping rule stays the model's and cannot drift from it.

      Parameters

      • trace: Trace

        The trace rebuilt from the updated data

      • appended: AppendedPointInfo

        Location of the appended point

      Returns { row: number; col: number }

      The position to read the appended point's state at