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

    Function choroplethRegionSelectors

    • Choropleth selectors: one region at a time, in the order the trace declared them.

      Plotly draws a path per calc entry — including the entries it resolved to no region at all, which stay in the DOM with no shape — so a region is addressed by its own position rather than by counting the ones before it. That keeps the pairing right for a map whose data has holes, which is the ordinary case: a value the source had nothing for is still a row.

      The trace's group is counted within its own geo subplot, since plotly hangs no uid class on these groups either.

      Parameters

      • gd: PlotlyGraphDiv

        The plotly graph div

      • traceIndex: number

        The global index of the choropleth trace

      • indices: number[]

        The calc index of each region the layer emitted

      Returns string[]

      One selector per region