Precompute all per-layer position→index lookups from the raw chart, once at
init. This keeps highlight resolution O(1) and aligned with the original
Chart.js element indices even though MAIDR extraction skips gap markers and
axis-stacked panels see only a partition of the datasets.
Precompute all per-layer position→index lookups from the raw chart, once at init. This keeps highlight resolution O(1) and aligned with the original Chart.js element indices even though MAIDR extraction skips gap markers and axis-stacked panels see only a partition of the datasets.